Invitations

Endpoints for creating and managing invitations

Get all invitations

get

This endpoint retrieves all invitations associated with the provided API key.

Authorizations
Query parameters
sort-fieldstringOptional

The field to sort by.

sort-directionstringOptional

The direction to sort (asc or desc).

page-sizeintegerOptional

The number of invitations per page.

current-pageintegerOptional

The current page number.

item-countintegerOptional

The total number of items.

Responses
200
A list of invitations
application/json
get
GET /api/v1/invitations HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Accept: */*
{
  "invitations": {
    "params": {},
    "count": 1,
    "rows": [
      {}
    ]
  }
}

Create a new invitation

post

This endpoint creates a new invitation of type OOB or CV1.

Authorizations
Body
invitation_typestringOptional

The type of the invitation (OOB or CV1).

Default: OOB
contact_idstringOptional

The ID of the contact.

Default: undefined
handshake_protocolstringOptional

The handshake protocol for OOB invitations.

Default: undefined
aliasstringOptional

The alias for the invitation.

Default: undefined
invitation_modestringOptional

The mode of the invitation.

Default: undefined
acceptstringOptional

The accept criteria for the invitation.

Default: true
publicbooleanOptional

Whether the invitation is public.

Default: false
invitation_rolestringOptional

The role of the invitation.

Default: undefined
invitation_labelstringOptional

The label of the invitation.

Default: undefined
invitation_statusstringOptional

The status of the invitation.

Default: undefined
invitation_descriptionstringOptional

The description of the invitation.

Default: undefined
invitation_active_starting_atstring · date-timeOptional

The start time of the invitation's active period.

Default: undefined
invitation_active_ending_atstring · date-timeOptional

The end time of the invitation's active period.

Default: undefined
uses_allowednumberOptional

The number of uses allowed for the invitation.

Default: undefined
Responses
200
Invitation created successfully
application/json
post
POST /api/v1/invitations HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 412

{
  "invitation_type": "OOB",
  "contact_id": "",
  "handshake_protocol": "https://didcomm.org/didexchange/1.1",
  "alias": "API Invitation",
  "invitation_mode": "once",
  "accept": "auto",
  "public": false,
  "invitation_role": "Holder",
  "invitation_label": "OOB",
  "invitation_status": "active",
  "invitation_description": "Invitation created through API",
  "invitation_active_starting_at": null,
  "invitation_active_ending_at": null,
  "uses_allowed": null
}
{
  "invitation_url": "https://fresh-fox-61.tun2.indiciotech.io?oob=eyJAdHlwZSI6ICJodHRwczovL2RpZGNvbW0ub3JnL291dC1vZi1iYW5kLzEuMS9pbnZpdGF0aW9uIiwgIkBpZCI6ICIzMzAyMDMyZC05MTA4LTQ4YzMtYmM3ZC1mZjZiNzU1ZDcyMmQiLCAibGFiZWwiOiAiT09CIiwgImhhbmRzaGFrZV9wcm90b2NvbHMiOiBbImh0dHBzOi8vZGlkY29tbS5vcmcvZGlkZXhjaGFuZ2UvMS4xIl0sICJzZXJ2aWNlcyI6IFsiZGlkOnNvdjo5NUxBeVFpdE5oNWtWYWF5Q0ZDOVMyIl19",
  "invitation_id": 1,
  "contact_id": ""
}

Accept an invitation

post

This endpoint accepts an invitation of type CV1 or OOB.

Authorizations
Body
invitation_urlstringOptional

The URL of the invitation to be accepted.

Default: undefinedExample: https://example.com/invitation?c_i=abc123
Responses
200
Invitation accepted successfully
application/json
post
POST /api/v1/invitations/accept HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "invitation_url": "https://example.com/invitation?c_i=abc123"
}
{
  "success": true,
  "invitation_record": {}
}

Get invitation workflow

get

Retrieves the invitation workflow for the provided wallet ID.

Authorizations
Responses
200
Invitation workflow retrieved successfully
application/json
get
GET /api/v1/invitations/workflow HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Accept: */*
{
  "key": "invitationWorkflow",
  "value": {
    "invitation_key": "AVSmbahEchK641kL89YeLP5CedttAiokHDA5vNDGg4wg"
  },
  "wallet_id": "a82f9494-b989-473e-a9aa-4ff6c3a46825"
}

Get invitation by ID

get

This endpoint retrieves a specific invitation by its ID.

Authorizations
Path parameters
idstringRequired

The ID of the invitation.

Example: 1
Responses
200
Invitation retrieved successfully
application/json
get
GET /api/v1/invitations/{id} HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Accept: */*
{}

Update an invitation

put

This endpoint updates an existing invitation.

Authorizations
Path parameters
idstringRequired

The ID of the invitation to update.

Body
workflow_statusstringOptional

The workflow status of the invitation.

Example: active
descriptionstringOptional

The description of the invitation.

Example: This is an updated invitation.
active_starting_atstring · date-timeOptional

The start time of the invitation.

Example: 2023-01-01T00:00:00Z
active_ending_atstring · date-timeOptional

The end time of the invitation.

Example: 2023-12-31T23:59:59Z
uses_allowedintegerOptional

The number of uses allowed for the invitation.

Example: 1
Responses
200
Invitation updated successfully
application/json
put
PUT /api/v1/invitations/{id} HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 178

{
  "workflow_status": "active",
  "description": "This is an updated invitation.",
  "active_starting_at": "2023-01-01T00:00:00Z",
  "active_ending_at": "2023-12-31T23:59:59Z",
  "uses_allowed": 1
}
{}

Delete an invitation

delete

This endpoint deletes an existing invitation.

Authorizations
Path parameters
idstringRequired

The ID of the invitation to delete.

Responses
200
Invitation deleted successfully
application/json
delete
DELETE /api/v1/invitations/{id} HTTP/1.1
Host: 
x-api-key: YOUR_API_KEY
Accept: */*
{
  "success": "Invitation was deleted successfully!"
}

Was this helpful?