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
UpdateAccountDto5 of 9 fields have no description in the spec.
titleColor#stringhex colorCustomize the default color of titles used in the campaign page
accentColor#stringhex colorCustomize the default color of buttons used in the campaign page
subdomain#stringSubdomain of the external page
customDomain#stringCustom domain of the external page
billingInfo#UpdateBillingInfoDto9 child fields
streetstringHeadquarters' address line 1
streetAdditionstringHeadquarters' address line 2
citystringHeadquarters' city
countrystringHeadquarters' country ISO code
zipstringHeadquarters' zip code
companyNamestring3 to 100 characterslegalRegistrationNumberstringemailstringemail addressphonestring
fiscalInfo#UpdateFiscalInfoDto8 child fields
streetstringHeadquarters' address line 1
streetAdditionstringHeadquarters' address line 2
citystringHeadquarters' city
countrystringHeadquarters' country ISO code
zipstringHeadquarters' zip code
companyNamestring3 to 100 characterslegalRegistrationNumberstringemailstringemail address
name#string3 to 100 characterslogoUrl#stringURLfaviconUrl#stringURL
Response
200 · AccountNo field is described in the spec.
accountId#stringalways returnedname#stringalways returnedstatus#AccountStatusalways returnedPENDINGVALIDATEDCLOSEDtype#AccountTypealways returnedINDIVIDUALCOMPANYlogoUrl#stringfaviconUrl#stringtitleColor#stringaccentColor#stringheadcount#stringauthSchemes#AuthScheme[]always returnedparentAccountId#stringlinkedAccountId#stringcreatedAt#string (date-time)always returnedupdatedAt#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" }
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" }'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.