Record acceptance of the current terms version (GDPR).
POST
/v1/account/consent
const url = 'https://api.share2.us/v1/account/consent';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"version":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.share2.us/v1/account/consent \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "version": "example" }'Appends a consent record (with IP + user-agent) and an audit event. The version must equal the current terms version. Requires an interactive login (a personal API token cannot accept terms).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
version
required
string
Examplegenerated
{ "version": "example"}Responses
Section titled “Responses”Consent recorded.
The submitted version is not current (stale_terms).
default
Section titled “default”Standard error envelope.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "quota_exceeded" }}