> ## Documentation Index
> Fetch the complete documentation index at: https://docs.grdd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Invitation registration

> Upcoming general-invitation signup on Connect: send an email invitation, register its recipient and handle completion or retries.

> [!WARNING]
>
> The registration endpoint is not available yet. It requires a coordinated rollout. Invitation sending already exists, but do not switch signup to the new registration endpoint until GRiDD confirms availability. These examples are reference material, not a live testing procedure.

Use `https://data.grdd.net` for both Connect endpoints on this page. The inviting company sends an authenticated request. The recipient registers without a bearer token or an existing GNet account.

This flow applies to **general invitations**. [Plain signup on Core](https://docs.grdd.dev/connect-api/sign-up.md) and document invitations keep their existing flows. `POST /api/invitations/{invitationId}/accept` does not create an account and is not a substitute for registration.

## Send a general invitation

Send `POST https://data.grdd.net/api/invitations` with a [Core-issued access token](https://docs.grdd.dev/connect-api/get-token.md) for the inviting company, `Content-Type: application/json` and `Idempotency-Key`. Connect derives the inviting company and user from the token. Do not send an inviter ID.

Use a new idempotency key for a new invitation. Use the **same key and body** to retry the same send request. A key must contain 8 to 128 printable ASCII characters without spaces. Reusing a key with a different body, or while the first request is still in progress, returns a conflict. Do not generate another key to work around an unknown send outcome, because that can create another invitation and email.

```bash theme={null}
curl --include --fail-with-body \
  'https://data.grdd.net/api/invitations' \
  --header 'Authorization: Bearer <ACCESS_TOKEN>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <NEW_INVITATION_KEY>' \
  --data '{
    "inviteType": "general",
    "inviteeEmail": "operator@example.com",
    "autoPartnerOnSignup": true
  }'
```

### Send fields

The general-invitation body is strict. Unknown fields are rejected.

| Field | Required | Meaning |
| - | - | - |
| `inviteType` | Yes | Must be `"general"` for this flow. |
| `inviteeEmail` | Yes | Valid recipient email address. The recipient must use this email to register. |
| `autoPartnerOnSignup` | No | Boolean. Defaults to `true`. Creates a partnership with the inviter after signup. Independent Operators always receive that partnership, even if this is `false`. |
| `inviteMyIo` | No | Boolean. If `true`, restricts signup to an Independent Operator and forces `autoPartnerOnSignup` to `true`. |
| `expiresAt` | No | Integer expiration timestamp in milliseconds since the Unix epoch. |
| `message` | No | Invitation message, at most 5,000 characters. This is not the registration referral note. |

Do not include document-template fields in a general invitation.

### Send response and email delivery

Connect records a pending invitation and queues an email with the Dashboard signup link. The response contains `operationId`, top-level `status`, `effects` and `invitation`. Read the new invitation ID from **`invitation.id`**, not `operationId`.

* HTTP `201` with top-level `status: "completed"` means the send operation's effects completed. The new invitation itself still has `invitation.status: "pending"` until the recipient completes signup.
* HTTP `202` with top-level `status: "pending"` means the invitation was recorded but a follow-up effect is incomplete. Inspect `effects` for `invitation_cache` and `worker_event`, their status and `retryable`. Do not assume the email was sent.
* Replaying the same key returns the recorded response. It does not guarantee that an incomplete delivery effect has recovered. Contact [GRiDD support](mailto:support@grdd.net) with `operationId` if the send remains pending.

Neither a completed send nor email-provider acceptance proves inbox delivery.

> [!WARNING]
>
> Treat the invitation ID and full signup link as credentials. Anyone with the link can open the page and see the locked recipient email. Do not put the ID or link in logs, screenshots or support messages. Deliver the signup link through the invitation email.

## Register the recipient

Send `POST https://data.grdd.net/api/invitations/{invitationId}/register` with `Content-Type: application/json`. **Do not send a bearer token.** This method does not require `Idempotency-Key`; recovery uses the same invitation and registration body.

For a new registration, the invitation must be general, pending and unexpired. If the invitation restricts the company type, `coType` must match it.

The Dashboard locks `mainEmail` to the invitation recipient. Direct API callers must also submit that email. Connect trims the submitted email and converts it to lowercase before checking the match. Do not let the recipient change it to register another person.

```bash theme={null}
curl --include --fail-with-body \
  'https://data.grdd.net/api/invitations/<INVITATION_ID>/register' \
  --header 'Content-Type: application/json' \
  --data-binary @registration.json
```

Example `registration.json`:

```json theme={null}
{
  "coType": "CO",
  "name": "Example Transport",
  "mainContact": "Dana Example",
  "mainEmail": "operator@example.com",
  "mainPhone": "+1 202 555 0142",
  "address": "100 Example Street, Washington, DC 20001",
  "fleet_size": "1-5",
  "password": "<NEW_PASSWORD>",
  "confirmPassword": "<NEW_PASSWORD>"
}
```

Use a new password that meets the rules below. The placeholder is not a suggested password. Keep the real file private and out of source control. Remove it when no longer needed. Keep passwords out of shell history and logs in your integration.

### Required registration fields

The body accepts only the fields in these tables. Unknown fields are rejected. Text fields are trimmed unless stated otherwise.

| Field | Validation |
| - | - |
| `coType` | `"CO"` for Company Operator or `"IO"` for Independent Operator. |
| `name` | Company or operator name, 3 to 100 characters. |
| `mainEmail` | Valid email, at most 50 characters. Must match the invitation recipient after trimming and case normalization. |
| `mainPhone` | 5 to 50 characters with at least five digits. Allows digits, spaces, `+` at the start, parentheses, periods and hyphens. |
| `address` | 5 to 250 characters. |
| `fleet_size` | One of `"1-5"`, `"6-15"`, `"16-40"`, `"41-100"`, `"101+"`. |
| `password` | At least 8 characters, at most 100 characters and at most 72 UTF-8 bytes. Not trimmed. |
| `confirmPassword` | Same rules as `password`. Must match it exactly. |
| `mainContact` | Required for `CO`, optional for `IO`. 1 to 50 characters. Must include a letter. Allows Unicode letters and marks, spaces, apostrophes, periods and supported name hyphens. No digits. |

### Optional registration fields

| Field | Validation |
| - | - |
| `city`, `state`, `zipCode`, `country` | Each must contain 1 to 50 characters if supplied. |
| `countryCode` | At most 10 characters. |
| `webURL` | At most 500 characters. Empty or an absolute HTTP/HTTPS URL without embedded credentials. |
| `vendor_platform` | Reservation system, at most 50 characters. |
| `griddid` | Only for `IO`. Proposed GNET ID, 3 to 50 characters, with at least one Unicode letter or digit. The completed response contains the assigned ID. |

Do not send `notes`, `selfSignup`, `mode`, `invitationId`, an inviter ID, account activation fields or profile visibility fields in this body. The invitation ID belongs only in the URL. Connect sets the referral note from the stored invitation, using the inviting user and company. The recipient cannot edit that referral or choose account status.

## Handle the registration result

Check both the HTTP status and the response `status`. Do not apply the send endpoint's response format or Core signup's review statuses to this method.

### Completed registration

HTTP `201` returns:

```json theme={null}
{
  "submissionReference": "00000000-0000-4000-8000-000000000001",
  "status": "completed",
  "griddid": "example-transport",
  "username": "operator@example.com",
  "accountStatus": "active",
  "nextAction": "complete"
}
```

The company is immediately **active** and the first user's login is **enabled**. This flow does not send the application for manual review. The user can sign in with the returned `username` and submitted password through the existing [token flow](https://docs.grdd.dev/connect-api/get-token.md). This response does not contain an access token.

For an `IO`, Connect sets the profile to partner-only visibility and creates a partnership with the inviting company. This applies even when the invitation's `autoPartnerOnSignup` is `false`. For a `CO`, Connect creates the partnership when `autoPartnerOnSignup` is `true`.

### Pending registration and retries

HTTP `202` returns:

```json theme={null}
{
  "submissionReference": "00000000-0000-4000-8000-000000000001",
  "status": "pending",
  "retryable": true
}
```

A pending response **does not mean registration finished**. Account creation or follow-up work can still be incomplete.

| Result | What to do |
| - | - |
| `status: "pending"`, `retryable: true` | Retry the same body with the same invitation. Do not create a new invitation or change registration fields to bypass pending work. |
| `status: "pending"`, `retryable: false` | Stop automated retries. Give `submissionReference` to GRiDD support. The account-creation outcome is not confirmed. |
| `status: "completed"` | Continue to sign-in. Repeating the same completed submission returns its completed result rather than creating another account. |

### Rejected requests

Requests can fail when fields are invalid, the email does not match, the invitation is missing, expired or not pending, the company type does not match, or a later submission changes the registration fields. A registration can also be refused because of an account conflict.

Do not treat an error as a review submission or successful signup. Correct validation problems before submitting again. Do not repeatedly retry conflicts or bypass them through plain signup. Retain the HTTP status, error code and correlation ID for support, without the credential-bearing URL or request body.

## Contact support safely

For a pending registration, give [GRiDD support](mailto:support@grdd.net) the `submissionReference`. It is a support reference, not the invitation credential. For send problems, use `operationId` instead.

Never include passwords, password confirmation, bearer tokens, the invitation ID or the full signup link in a support message. Do not attach the registration request body. A pending result is not permission to create another account or send another invitation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.