v1

latestOpenAPI 3.0.02026-08-04891301.4 MB

Create a user invite

Creates a new invite for the authenticated user. The invite can optionally be scoped to a specific thread, a persona, or carry arbitrary metadata. The caller receives the new invite object at HTTP 201.

The invite key is always generated server-side (192-bit URL-safe random string) and cannot be supplied by the caller.

The path :user must match the authenticated user. If a thread_id is provided, the authenticated user must have permission to invite others to that thread; team threads are not supported and return an error. Supplying a thread_id that does not exist or that belongs to a different user returns an error. If a key collision occurs during creation the call returns a 409 conflict — simply retry to generate a new key.

post/api/v1/users/{user}/invites

Path parameters

userstring required

User ID (usr_...). Must match the authenticated user.

Request body

Example request

{
  "invite": {
    "metadata": {
      "key": "value"
    },
    "persona_id": "string",
    "thread_id": "string"
  }
}

Response

Successful response

created_atstring date-time

When this invite was created (ISO 8601).

idstring required

Invite ID (uin_...).

keystring

Secret bearer token used to accept this invite. Treat this value like a password — do not log or expose it publicly.

metadataobject

Arbitrary key-value metadata attached to the invite at creation time. Defaults to an empty object.

threadstring

ID of the thread this invite is scoped to (thr_...). null if the invite is not bound to a thread.

Example response

{
  "created_at": "2024-01-01T00:00:00Z",
  "id": "uin_0aBcDeFgHiJkLmNoPqRsTu",
  "key": "string",
  "metadata": {
    "key": "value"
  },
  "thread": "thr_0aBcDeFgHiJkLmNoPqRsTu",
  "user": {
    "id": "usr_0aBcDeFgHiJkLmNoPqRsTu",
    "name": "Example Name",
    "profile_picture": {
      "file": "fil_0aBcDeFgHiJkLmNoPqRsTu",
      "height": 600,
      "media": "med_0aBcDeFgHiJkLmNoPqRsTu",
      "mime_type": "application/json",
      "refresh_url": "https://example.com",
      "url": "https://example.com",
      "width": 800
    }
  }
}