Skip to content
Aller au contenu
Charitips

API reference · Accounts

Create an invitation

POST/v1/accounts/{accountId}/invite

Create and send an invitation to grant access to the Charitips dashboard

Requires a Bearer access token.

Parameters

This field has no description in the spec.

  • accountId#stringin pathrequired

Body

InviteDto

No field is described in the spec.

  • email#stringrequiredemail address

  • firstName#stringrequired

  • lastName#stringrequired

  • phone#string

  • role#objectrequired

    ADMINMEMBERPAYROLL_MANAGER

  • campaignIds#string[]UUID

Response

201 · UserInvitation

No field is described in the spec.

  • userInvitationId#stringalways returned

  • firstName#stringalways returned

  • lastName#stringalways returned

  • email#stringalways returned

  • phone#string

  • slug#stringalways returned

  • status#UserInvitationStatusalways returned

    PENDINGCLAIMEDCANCELED

  • role#Rolealways returned

    ADMINMEMBERPAYROLL_MANAGER

  • accountId#stringalways returned

  • createdAt#string (date-time)always returned

  • updatedAt#string (date-time)always returned

Errors

  • 400 Bad Request
  • At least one campaign is required for members
    {
      "statusCode": 400,
      "message": "At least one campaign is required for members",
      "error": "Bad Request"
    }
  • Invalid campaignIds
    {
      "statusCode": 400,
      "message": "Invalid campaignIds",
      "error": "Bad Request"
    }
  • A field is missing, has the wrong type, or is not part of the request schema.

    Every request with a body or query is validated.

    {
      "statusCode": 400,
      "message": [
        "amount must not be less than 1",
        "property foo should not exist"
      ],
      "error": "Bad Request"
    }
  • 401 Unauthorized
  • Unauthorized

    Missing, expired or invalid access token.

    {
      "statusCode": 401,
      "message": "Unauthorized"
    }
  • 402 Payment Required
  • Plan upgrade required
    {
      "statusCode": 402,
      "message": "Plan upgrade required"
    }
  • 403 Forbidden
  • Forbidden
    {
      "statusCode": 403,
      "message": "Forbidden"
    }
  • Account closed
    {
      "message": "Account closed",
      "code": "ACCOUNT_CLOSED"
    }
  • 404 Not Found
  • Not Found

    No resource with this id on your account: the API answers as if it did not exist.

    {
      "statusCode": 404,
      "message": "Not Found"
    }
  • 409 Conflict
  • User already exist
    {
      "statusCode": 409,
      "message": "User already exist",
      "error": "Conflict"
    }
  • Invitation already exist
    {
      "statusCode": 409,
      "message": "Invitation already exist",
      "error": "Conflict"
    }
POST /v1/accounts/<accountId>/invite
curl -X POST https://api.sandbox.charitips.com/v1/accounts/<accountId>/invite \  -H "Authorization: Bearer $CHARITIPS_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "email": "jane.doe@example.com",    "firstName": "Jane",    "lastName": "Doe",    "role": "ADMIN"  }'
Built from the spec and the API code

Request bodies are written for this docs and checked against the API's validation; ids in angle brackets are placeholders. Response values are placeholders built from the schema.