Skip to content
Aller au contenu
Charitips

API reference · Users

Create a user

POST/v1/users

Create a user having access to the Charitips dashboard.

Requires a Bearer access token.

Body

CreateUserDto

No field is described in the spec.

  • persona#stringrequired

    Optional in the spec, required by the API.

    CSRMARKETINGHRSALESCOMMUNICATIONPRODUCTSMBOTHER

  • accountId#stringrequiredUUID

  • pictureUrl#stringURL

  • email#stringrequiredemail address

  • firstName#stringrequired

  • lastName#stringrequired

  • phone#string

  • role#objectrequired

    ADMINMEMBERPAYROLL_MANAGER

  • campaignIds#string[]UUID

Response

200 · User

No field is described in the spec.

  • userId#stringalways returned

  • firstName#stringalways returned

  • lastName#stringalways returned

  • email#stringalways returned

  • phone#string

  • pictureUrl#string

  • role#Rolealways returned

    ADMINMEMBERPAYROLL_MANAGER

  • persona#Persona

    CSRMARKETINGHRSALESCOMMUNICATIONPRODUCTSMBOTHER

  • accountId#string

  • createdAt#string (date-time)always returned

  • updatedAt#string (date-time)always returned

Errors

  • 400A 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"
    }
  • 401Unauthorized

    Missing, expired or invalid access token.

    {
      "statusCode": 401,
      "message": "Unauthorized"
    }
  • 403Account closed
    {
      "message": "Account closed",
      "code": "ACCOUNT_CLOSED"
    }
POST /v1/users
curl -X POST https://api.sandbox.charitips.com/v1/users \  -H "Authorization: Bearer $CHARITIPS_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "persona": "CSR",    "accountId": "<accountId>",    "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.