Documentation

Documentation

YourOwn SetupYourOwn SDKYourOwn API
Sphere SetupSphere SDKSphere API
  • Resources

›Reference

Introduction

  • Copilot.cx Server API

Reference

  • Collect API
  • Collect payload

    • User events
    • Thing events
    • Custom events
    • Misc. events
    • Preexisting sync events
  • Consent endpoint

Appendix

  • Releases

Consent endpoint

Purpose

This endpoint reports that an end-user's data is allowed to be processed by Copilot.

This data can also be sent as part of the user_created / user_updated / preexisting_user_created events as a data-point instead of a response-based endpoint.

Consent data is only required for fully GDPR-compliant systems (a configuration parameter set by your Technical Onboarding Manager). This is to validate that data is being collected and that targeted campaigns are only sent out to users who explicitly agreed to analytics collection in your service.

By default, it is not required, and data will be collected automatically.

If it is required, then explicit consent must be requested from each end-user and submitted to Copilot.cx Report. End-users must be allowed to change their consent status at any time. Once they do, you must report the new status to Copilot.

Please refer the user_id best practices here.

API Description

Request

  • Endpoint :
https://api.<YOUR_ENVIRONMENT>.bycopilot.com/v2/api/report/user_copilot_analysis_consent_changed
  • HTTP Method : POST
  • HTTP Headers :
    • Content-Type : application/json
    • Authorization: Basic $YOUR_AUTH_DATA_HERE$
  • HTTP Request Body: A single consent_value (described below) may be sent in each Consent endpoint request.
FieldTypeDescriptionMandatory
consent_valueBooleanThis value must be true in order to process this User’s data in Copilot. If this value is false, then the following applies. Copilot.cx will not include this user in engagement campaigns. For example, they will not receive Reduce Churn emails. This user’s raw events will not be presented in the User card on Copilot.cx Support. The user will be counted towards anonymous aggregations on Copilot.cx dashboards.Y
user_idStringSpecifies the unique identifier of the end-user that awarded consent. This identifier should be the same as used in the user_created event.Y

For example setting a user with user_id "325ca496-afe8-4f44-bd37-b0dc90bdfdea" which agreed to Copilot.cx analysis consent (true):

{
  "consent_value": true,
  "user_id": "325ca496-afe8-4f44-bd37-b0dc90bdfdea"
}
  • HTTP Response body:
    • Success: Empty body
      {}
      
    • Failure (e.g. in case of missing property consent_value):
      {
        "reason": "COMMON.REQUEST_VALIDATION",
        "error_message": "1 validation error: [ may not be null --> consent_value ]"
      }
      

The following describes the two fields in the error response

  • reason - Contains one of the fixed strings ‒ AUTH.UNAUTHORIZED or COMMON.REQUEST_VALIDATION.
  • error_message - Provides a description of the error that occurred.

The following lists the possible errors –

HTTP CodeDescription
401Invalid Token (Not Bearer, Basic Token or Token Expired)
← Preexisting sync eventsReleases →
  • Request
Copilot
Mail: hello@copilot.cx
Call: (212).398.0001
© Copilot.cx 2025