Skip to content
Aller au contenu
Charitips

API reference · Accounts

Update an account

PATCH/v1/accounts/{accountId}

Update an account information

Requires a Bearer access token.

Parameters

This field has no description in the spec.

  • accountId#stringin pathrequired

Body

UpdateAccountDto

5 of 9 fields have no description in the spec.

  • titleColor#stringhex color

    Customize the default color of titles used in the campaign page

  • accentColor#stringhex color

    Customize the default color of buttons used in the campaign page

  • subdomain#string

    Subdomain of the external page

  • customDomain#string

    Custom domain of the external page

  • billingInfo#UpdateBillingInfoDto

    9 child fields
    • streetstring

      Headquarters' address line 1

    • streetAdditionstring

      Headquarters' address line 2

    • citystring

      Headquarters' city

    • countrystring

      Headquarters' country ISO code

    • zipstring

      Headquarters' zip code

    • companyNamestring3 to 100 characters

    • legalRegistrationNumberstring

    • emailstringemail address

    • phonestring

  • fiscalInfo#UpdateFiscalInfoDto

    8 child fields
    • streetstring

      Headquarters' address line 1

    • streetAdditionstring

      Headquarters' address line 2

    • citystring

      Headquarters' city

    • countrystring

      Headquarters' country ISO code

    • zipstring

      Headquarters' zip code

    • companyNamestring3 to 100 characters

    • legalRegistrationNumberstring

    • emailstringemail address

  • name#string3 to 100 characters

  • logoUrl#stringURL

  • faviconUrl#stringURL

Response

200 · Account

No field is described in the spec.

  • accountId#stringalways returned

  • name#stringalways returned

  • status#AccountStatusalways returned

    PENDINGVALIDATEDCLOSED

  • type#AccountTypealways returned

    INDIVIDUALCOMPANY

  • logoUrl#string

  • faviconUrl#string

  • titleColor#string

  • accentColor#string

  • headcount#string

  • authSchemes#AuthScheme[]always returned

  • parentAccountId#string

  • linkedAccountId#string

  • createdAt#string (date-time)always returned

  • updatedAt#string (date-time)always returned

Errors

  • 400 Bad Request
  • Subdomain must ends with .<subdomain>
    {
      "statusCode": 400,
      "message": "Subdomain must ends with .<subdomain>",
      "error": "Bad Request"
    }
  • Nested subdomains are not allowed
    {
      "statusCode": 400,
      "message": "Nested subdomains are not allowed",
      "error": "Bad Request"
    }
  • Invalid customDomain
    {
      "statusCode": 400,
      "message": "Invalid customDomain",
      "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
  • Subdomain can't be updated for parent accounts
    {
      "statusCode": 403,
      "message": "Subdomain can't be updated for parent accounts",
      "error": "Forbidden"
    }
  • Parent account is missing a domain
    {
      "statusCode": 403,
      "message": "Parent account is missing a domain",
      "error": "Forbidden"
    }
  • Custom domain can't be updated for parent accounts
    {
      "statusCode": 403,
      "message": "Custom domain can't be updated for parent accounts",
      "error": "Forbidden"
    }
  • Account closed
    {
      "message": "Account closed",
      "code": "ACCOUNT_CLOSED"
    }
  • Forbidden

    Your credentials cannot perform this action on this resource. An id from another account answers 404 in the path, 400 in the body or the query.

    {
      "statusCode": 403,
      "message": "Forbidden"
    }
  • 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"
    }
PATCH /v1/accounts/<accountId>
curl -X PATCH https://api.sandbox.charitips.com/v1/accounts/<accountId> \  -H "Authorization: Bearer $CHARITIPS_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "titleColor": "#080808",    "accentColor": "#929FFF"  }'
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.