Skip to main content
POST
/
guest-invitations
Create guest invitation
curl --request POST \
  --url https://api.mycreditapp.ai/v1-beta/guest-invitations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Requester-Organization-ID: <requester-organization-id>' \
  --header 'Target-Organization-ID: <target-organization-id>' \
  --data '
{
  "email": "jsmith@example.com",
  "expired_at": "2023-11-07T05:31:56Z",
  "parent_organization_id": "b123f0d1-8d3f-4cfa-91b8-9f9b0c5e2a88"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "host_organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "email": "jsmith@example.com",
  "first_invitation_sent_at": "2023-11-07T05:31:56Z",
  "last_invitation_sent_at": "2023-11-07T05:31:56Z",
  "expired_at": "2023-11-07T05:31:56Z",
  "expired": true,
  "status": "sent",
  "invitation_token": "<string>",
  "archived": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "accepted_at": "2025-12-11T09:00:00.123456",
  "archived_at": "2025-12-11T09:00:00.123456",
  "parent_organization_id": "b123f0d1-8d3f-4cfa-91b8-9f9b0c5e2a88",
  "parent_organization_name": "Parent Organization Corp"
}

Authorizations

Authorization
string
header
required

Bearer authentication using a JWT token. Provide a valid access token. Authorization header format: Authorization: Bearer <token>.

Headers

Requester-Organization-ID
string<uuid>
required

The unique identifier of the organization making the request. This ID is used to authorize the requester within the system.

Example:

"054b4106-174b-46b0-97f8-86d8d7b6f0af"

Target-Organization-ID
string<uuid>
required

The unique identifier of the organization that is the target of the request. The Target-Organization-ID may match the Requester-Organization-ID if the requester accesses their own resources. If the Target-Organization-ID differs from the Requester-Organization-ID, the requester can access third-party resources if the requester has a connection with the target organization and is authorized to perform such actions.

Example:

"123e4567-e89b-12d3-a456-426614174000"

Body

application/json
email
string<email>
required

Email address of the guest to be invited

Required string length: 3 - 100
Example:

"guest@example.com"

expired_at
string<date-time>
required

Expiration datetime of the invitation. Must be in the future

Example:

"2025-12-31T23:59:59.123456"

parent_organization_id
string<uuid> | null

Optional ID of the parent organization if the guest belongs to one

Example:

"b123f0d1-8d3f-4cfa-91b8-9f9b0c5e2a88"

Response

Successful Response

id
string<uuid>
required

Unique identifier of the guest invitation

Example:

"d290f1ee-6c54-4b01-90e6-d701748f0851"

host_organization_id
string<uuid>
required

ID of the organization that sent the invitation

Example:

"c9b1f0d1-8d3f-4cfa-91b8-9f9b0c5e2a77"

email
string<email>
required

Email address of the guest to be invited

Required string length: 3 - 100
Example:

"guest@example.com"

first_invitation_sent_at
string<date-time>
required

Timestamp when the first invitation was sent

Example:

"2025-12-01T12:00:00.123456"

last_invitation_sent_at
string<date-time>
required

Timestamp when the most recent invitation was sent

Example:

"2025-12-01T12:00:00.123456"

expired_at
string<date-time>
required

Expiration datetime of the invitation. Must be in the future

Example:

"2025-12-31T23:59:59.123456"

expired
boolean
required

Indicates whether the invitation is expired

status
enum<string>
required

Current status of the invitation

Available options:
sent,
accepted_by_guest,
accepted_by_system
invitation_token
string
required

Unique token used to accept the invitation

Required string length: 10 - 2000
Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

archived
boolean
required

Flag indicating whether the invitation should be archived

created_at
string<date-time>
required

Timestamp when the invitation was created

Example:

"2025-12-11T09:00:00.123456"

updated_at
string<date-time>
required

Timestamp when the invitation was last updated

Example:

"2025-12-11T09:00:00.123456"

accepted_at
string<date-time> | null

Timestamp when the invitation was accepted, if applicable

Example:

"2025-12-11T09:00:00.123456"

archived_at
string<date-time> | null

Timestamp when the invitation was archived, if applicable

Example:

"2025-12-11T09:00:00.123456"

parent_organization_id
string<uuid> | null

Optional ID of the parent organization if the guest belongs to one

Example:

"b123f0d1-8d3f-4cfa-91b8-9f9b0c5e2a88"

parent_organization_name
string | null

Name of the parent organization, if applicable

Required string length: 1 - 300
Example:

"Parent Organization Corp"