Early access: these pages are being written and reviewed. Facts in the header boxes come straight from the product.
Delete a user and transfer their records
DELETE
/api/v1/users/{id}
const url = 'https://api.pitch2sale.com/api/v1/users/example';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"transfer_to_user_id":"example","acknowledge_data_deletion":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.pitch2sale.com/api/v1/users/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "transfer_to_user_id": "example", "acknowledge_data_deletion": true }'Organization owner only. Name an heir in transfer_to_user_id to receive the user’s records, or set acknowledge_data_deletion: true to move them to the trash; refused if the user owns records and neither is given. To block access reversibly, deactivate instead.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
transfer_to_user_id
string
acknowledge_data_deletion
boolean
Examplegenerated
{ "transfer_to_user_id": "example", "acknowledge_data_deletion": true}Responses
Section titled “Responses”OK
Validation failed
Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "details": [ { "field": "example", "message": "example", "code": "example" } ]}Authentication required or token invalid
Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "details": [ { "field": "example", "message": "example", "code": "example" } ]}Rate limit exceeded
Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "details": [ { "field": "example", "message": "example", "code": "example" } ]}