Redeem an API key invitation

POST /v1/api-keys/invites/{code}/redeem

If you have an invitation code, you can redeem it to create an Organization and an API key associated with it.

Path parameters

  • code string Required

    The code of the invite you want to redeem.

application/json

Body

  • organizationName string Required

    The name of the organization you want to create.

  • name string Required

    The name of the point of contact for the API subscription.

  • email string(email) Required

    The email of the point of contact for the API subscription.

Responses

  • 200 application/json

    Details about the created Organization and API Key.

    Hide response attributes Show response attributes object
    • success boolean Required

      Value is true.

    • apiKey string Required

      The API key you will need to use to authenticate your requests. The key cannot be retrieved again after it is created: keep it safe.

    • organizationID string Required

      The ID of the organization you have just created. You will need this ID to communicate with our team. Keep it safe.

    • validUntil string | null Required

      The date until which the API subscroption is valid.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 415 application/json

    Unsupported Media Type

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

    • The inner exception

      Hide inner_exception attributes Show inner_exception attributes object
POST /v1/api-keys/invites/{code}/redeem
curl \
 --request POST 'https://api.sensay.io/v1/api-keys/invites/{code}/redeem' \
 --header "Content-Type: application/json" \
 --data '{"organizationName":"string","name":"string","email":"hello@example.com"}'
Request examples
{
  "organizationName": "string",
  "name": "string",
  "email": "hello@example.com"
}
Response examples (200)
{
  "apiKey": "1234567890",
  "success": true,
  "validUntil": "2021-01-01",
  "organizationID": "1234567890"
}
Response examples (400)
{
  "success": true,
  "error": "string",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
Response examples (401)
{
  "success": true,
  "error": "string",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
Response examples (404)
{
  "success": true,
  "error": "string",
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
Response examples (415)
{
  "success": true,
  "error": "string",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
Response examples (500)
{
  "success": true,
  "error": "string",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "inner_exception": {
    "name": "Server overheated",
    "cause": "Request too complicated",
    "stack": "Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>...",
    "message": "The server overheated due to an unexpected situation"
  }
}