### Example GET Request Source: https://developers.rdstation.com/reference/conversas-v2-authentication Example of how to make a GET request to the /v2/employees endpoint using curl, including the necessary Authorization and Content-Type headers. ```bash curl https://api.tallos.com.br/v2/employees \ -X GET \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' ``` -------------------------------- ### Example Request Source: https://developers.rdstation.com/reference/conversas-v2-authentication An example of how to make a GET request to the /v2/employees endpoint, including the necessary Authorization header. ```APIDOC ## Example Request ```bash curl https://api.tallos.com.br/v2/employees \ -X GET \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' ``` ``` -------------------------------- ### Get Started Leads Source: https://developers.rdstation.com/reference/get_platform-workflows-id-leads-started Fetches leads that have started a specific automation workflow. The response includes a list of leads and their associated data. Pagination is applied based on the plan. ```APIDOC ## GET /platform/workflows/{id}/leads/started ### Description Returns a list of leads that have initiated an automation workflow. The data for this API is updated once a day, meaning analysis data will be available up to 24 hours after the event. ### Method GET ### Endpoint /platform/workflows/{id}/leads/started ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the workflow. #### Query Parameters - **limit** (integer) - Optional - The maximum number of leads to return per page. Default is 25. - **offset** (integer) - Optional - The number of leads to skip before starting to collect the result set. ### Response #### Success Response (200) - **leads** (array) - A list of leads that have started the workflow. - **lead_id** (string) - The unique identifier for the lead. - **email** (string) - The email address of the lead. - **name** (string) - The name of the lead. - **started_at** (string) - The timestamp when the lead started the workflow. #### Response Example { "leads": [ { "lead_id": "lead_123", "email": "example@example.com", "name": "John Doe", "started_at": "2023-10-27T10:00:00Z" } ] } ### Pagination Details - Light, Basic plans: Maximum 25 leads per page. - Pro plan: Maximum 50 leads per page. - Advanced plan: Maximum 100 leads per page. ``` -------------------------------- ### Example Authorization URL Source: https://developers.rdstation.com/reference/crm-v2-authentication-step-2 This is an example of a complete authorization URL after substituting the `client_id` and `redirect_uri` with credentials from a registered application. ```text https://accounts.rdstation.com/oauth/authorize?response_type=code&client_id=68956445-3421-4a0f-a0dd-3142a97621f4&redirect_uri=https://www.rdstation.com/contato ``` -------------------------------- ### CRM v1 Get Pipeline - Success Example Source: https://developers.rdstation.com/reference/crm-v1-get-pipeline This example demonstrates a successful response for retrieving pipeline information. It includes details about deal stages, their configurations, and associated metadata. ```json { "config": { "deal_won": { "copy_to_pipeline": { "deal_pipeline_id": "5fc0285ab5cd6f0012fca156", "deal_stage_id": "5fc0285ab5cd6f0012fca158", "owner_settings": { "group_id": "_team", "id": "5bab89733ccdb000201810ea", "name": "Meteoro de pégasus" } } } }, "deal_stages": [ { "_id": "54480f523f64f90155000034", "configuration": [ { "_id": "63970d03955d440026462995", "created_at": "2022-12-12T08:14:11.513-03:00", "extra": { "skip_days": [], "work_time": { "00:00:00": "23:59:59" } }, "format": "days", "type": "deal_stopped", "updated_at": "2022-12-12T08:14:11.513-03:00", "value": 1 } ], "id": "54480f523f64f90155000034", "name": "Proposta enviada", "nickname": "PE", "order": 1 }, { "_id": "54480f523f64f90155000032", "configuration": [ { "_id": "63970d062f6c18001a7795ec", "created_at": "2022-12-12T08:14:14.687-03:00", "extra": { "skip_days": [] } } ] } ], "id": "5f0f576f08c0c768b2dd4759", "name": "Funil Produto 1", "order": 1 } ``` -------------------------------- ### MEDIA_PLAYBACK_STARTED Event Request Example Source: https://developers.rdstation.com/reference/evento-inicio-playback-midia This example demonstrates the structure of a request payload for the MEDIA_PLAYBACK_STARTED event. It includes contact details and metadata about the media being played. ```json { "event_type": "MEDIA_PLAYBACK_STARTED", "event_family": "CDP", "payload": { "email": "contato@email.com", "name": "RD Station Developer", "company_name": "RD Station", "company_site": "https://site-contato.rdstation.com", "job_title": "Desenvolvedor", "personal_phone": "+55 48 3037-3600", "mobile_phone": "+55 48 3037-3600", "twitter": "https://twitter.com/contato", "facebook": "https://www.facebook.com/contato", "linkedin": "https://www.linkedin.com/in/contato", "website": "https://site-contato.rdstation.com", "media_type": "Video", "media_metadata": "https://www.mycompany.com/videos/c9266675-f484-44a7-9ad1-e43a080a8545", "media_recorded_content": true, "media_identifier": "c9266675-f484-44a7-9ad1-e43a080a8545", "media_category": "Marketing", "media_duration": 58, "media_published_date_timestamp": "2019-03-15T14:53:42.928Z", "legal_bases": [ { "category": "communications", "type": "consent", "status": "granted" } ] } } ``` -------------------------------- ### Resource Not Found Example Source: https://developers.rdstation.com/reference/mensagens-de-erro-rdsm This example shows the response when a requested resource does not exist within RD Station. ```APIDOC ## Resource Not Found If the resource does not exist in RD Station. `Status 404 not found` ``` -------------------------------- ### Resource Not Found Example Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Example of a Resource Not Found error (Status 404) when the resource does not exist or the token lacks visibility. ```APIDOC ### Resource Not Found If the resource does not exist in RD Station or the user's token does not have the necessary Visibility level to consult this information, or if the ID provided in the query is invalid. See [here](crm-v1-token) about the Token's visibility level. `Status 404 not found` #### Example ```json { "errors": { "error_type": "RESOURCE_NOT_FOUND", "error_message": "Lead not found." } } ``` ``` -------------------------------- ### Update Deal Source Response Example Source: https://developers.rdstation.com/reference/crm-v1-update-source This is an example of a successful response when updating a deal source. It includes the updated fields along with metadata like IDs and timestamps. ```json { "_id": "6422f7368a0d69002324b583", "created_at": "2023-03-28T11:18:30.495-03:00", "description": "Descrição da fonte - atualizado", "id": "6422f7368a0d69002324b583", "instance_id": "5b75b4235bdc75002b1b656f", "name": "Nome da fonte - atualizado", "updated_at": "2023-03-28T11:21:02.668-03:00" } ``` -------------------------------- ### API v1 Request Example Source: https://developers.rdstation.com/reference/rdsm-como-migrar-api-v1-para-api-v2 Example of a POST request to the API v1 for sending lead data. Requires a private token and uses 'status' and 'value' fields. ```json { "status": "won", "value": 200, "email": "[email@email.com](mailto:email@email.com)" } ``` -------------------------------- ### Invalid Parameter Example (Task Type Access) Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Example of an error (Status 422) when a Free plan user attempts to create tasks of an unsupported type. ```APIDOC ### Invalid Parameter If a Free plan attempts to create Tasks that are not `type: "task"`. `Status 422 Unprocessable Entity` #### Example ```json { "errors": [ { "error_type": "ACCESS_DENIED", "error_MESSAGE": "This account is not allowed to create tasks of the requested type", "feature": "extended_task_types", "access": "false" } ] } ``` ``` -------------------------------- ### New API Request Example Source: https://developers.rdstation.com/reference/rdsm-como-migrar-api-v1-para-api-v2 Example of a POST request to the new API for sending event data. Uses 'event_type' and a nested 'payload' object. Requires an Authorization header. ```json { "event_type": "SALE", "event_family":"CDP", "payload": { "email": "[email@email.com](mailto:email@email.com)", "funnel_name": "default", "value": 200 } } ``` -------------------------------- ### OpenAPI Definition for Get Lost Reason Source: https://developers.rdstation.com/reference/crm-v1-get-lost-reason This OpenAPI 3.1.1 definition outlines the structure for the 'crm-v1-get-lost-reason' operation, including parameters, request body, and successful response schema with an example. ```json { "openapi": "3.1.1", "info": { "title": "RD Station CRM API v1", "version": "1.0", "description": "Documentação da API v1 do RD Station CRM.", "license": { "name": "Termos de Uso do Software RD Station CRM", "url": "https://legal.rdstation.com/pt/rdstation-crm-services-agreement/" }, "termsOfService": "https://legal.rdstation.com/pt/rdstation-crm-services-agreement/", "contact": { "name": "Suporte RD Station", "url": "https://developers.rdstation.com/docs/suporte" } }, "externalDocs": { "description": "Documentação completa", "url": "https://developers.rdstation.com/crm-v1" }, "servers": [ { "url": "https://crm.rdstation.com/api/v1", "description": "Production" } ], "security": [ { "Token": [] } ], "tags": [ { "name": "crm-v1-deal-lost-reasons", "description": "Motivos de perda" } ], "paths": { "/deal_lost_reasons/{deal_lost_reason_id}": { "get": { "summary": "Obter motivo de perda", "operationId": "crm-v1-get-lost-reason", "tags": [ "crm-v1-deal-lost-reasons" ], "description": "Obter motivo de perda", "parameters": [ { "name": "deal_lost_reason_id", "in": "path", "required": true, "description": "ID do motivo de perda da negociação.", "schema": { "type": "string" } } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": {} } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "_id": { "type": "string", "example": "64ecbd494a685000305d811b" }, "created_at": { "type": "string", "example": "2023-08-28T12:29:13.080-03:00" }, "instance_id": { "type": "string", "example": "5b75b4235bdc75002b1b656f" }, "name": { "type": "string", "example": "Motivo 1" }, "updated_at": { "type": "string", "example": "2023-08-28T12:31:40.120-03:00" } } }, "examples": { "Success": { "value": { "_id": "64ecbd494a685000305d811b", "created_at": "2023-08-28T12:29:13.080-03:00", "instance_id": "5b75b4235bdc75002b1b656f", "name": "Motivo 1", "updated_at": "2023-08-28T12:31:40.120-03:00" } } } } } } } } } }, "components": { "securitySchemes": { "Token": { "type": "apiKey", "name": "token", "in": "query", "description": "Token do usuário" } } } } ``` -------------------------------- ### List Products from Deal Source: https://developers.rdstation.com/reference/crm-v2-list-products-from-deal This example demonstrates how to retrieve all products associated with a specific deal. You need to provide the deal ID in the request. ```APIDOC ## List Products from Deal ### Description Retrieves a list of products associated with a specific deal. ### Method GET ### Endpoint /deals/{dealId}/products ### Parameters #### Path Parameters - **dealId** (string) - Required - The unique identifier of the deal. ### Response #### Success Response (200) Returns a list of product objects associated with the deal. The structure of the product object is defined in the API schema. #### Response Example { "products": [ { "productId": "string", "name": "string", "quantity": 0, "price": 0.0 } ] } ``` -------------------------------- ### Get Attendance Summary Source: https://developers.rdstation.com/reference/conversas-v2-get-v1-analytics-attendances-summary Fetches aggregated attendance indicators within a specified time interval. You can filter the results by providing start date, end date, timezone, department IDs, and employee IDs. ```APIDOC ## GET /v1/analytics/attendances/summary ### Description Indicadores agregados de atendimentos no intervalo informado. ### Method GET ### Endpoint /v1/analytics/attendances/summary ### Parameters #### Query Parameters - **start_date** (string) - Required - Início do intervalo (ISO 8601). Deve ser estritamente anterior a `end_date` quando aplicável. - **end_date** (string) - Required - Fim do intervalo (ISO 8601). - **timezone** (string) - Required - Identificador de fuso horário (IANA). - **department_ids** (array of strings) - Optional - Filtro por departamentos. Aceita o parâmetro repetido na query (`department_ids=a&department_ids=b`), um único valor ou lista separada por vírgula. - **employee_ids** (array of strings) - Optional - Filtro por atendentes. Mesmas regras de formatação que `department_ids`. ### Response #### Success Response (200) - **AttendancesSummaryV1** (object) - Resumo calculado para o período #### Response Example { "example": "response body" } ``` -------------------------------- ### Create Product Source: https://developers.rdstation.com/reference/crm-v2-create-product Creates a new product with its respective details such as name, price, and description. ```APIDOC ## POST /products ### Description Creates a new product with its respective details such as name, price, and description. ### Method POST ### Endpoint https://api.rd.services/crm/v2/products ### Request Body - **data** (object) - Required - The product object containing details like name, price, and description. ### Request Example ```json { "data": { "name": "Example Product", "price": 100.50, "description": "This is an example product." } } ``` ### Response #### Success Response (201) - **data** (object) - The created product object. #### Response Example ```json { "data": { "id": "prod_12345", "name": "Example Product", "price": 100.50, "description": "This is an example product.", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z" } } ``` ``` -------------------------------- ### Listar catálogos - OpenAPI Definition Source: https://developers.rdstation.com/reference/listar-catalogo-de-produtos This OpenAPI definition outlines the GET request for listing product catalogs. It specifies the endpoint, expected responses for success (200) and errors (400, 409), and provides example payloads for each. ```json { "openapi": "3.1.0", "info": { "title": "rd-station-marketing-api", "version": "2.0" }, "servers": [ { "url": "https://api.rd.services/" } ], "components": { "securitySchemes": { "sec0": { "type": "oauth2", "flows": {} } } }, "security": [ { "sec0": [] } ], "paths": { "/platform/catalog_feeds": { "get": { "summary": "Listar catálogos", "description": "", "operationId": "listar-catalogo-de-produtos", "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "[ { "id": 1, "name": "Meu catálogo editado", "url": "https://meusite.com/catalogo.json", "status": "active", "format": "json", "created_at": "2025-07-24T10:54:42.061-03:00", "updated_at": "2025-07-24T10:54:42.061-03:00", "credentials": null } ]" } }, "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "example": 1, "default": 0 }, "name": { "type": "string", "example": "Meu catálogo editado" }, "url": { "type": "string", "example": "https://meusite.com/catalogo.json" }, "status": { "type": "string", "example": "active" }, "format": { "type": "string", "example": "json" }, "created_at": { "type": "string", "example": "2025-07-24T10:54:42.061-03:00" }, "updated_at": { "type": "string", "example": "2025-07-24T10:54:42.061-03:00" }, "credentials": {} } } } } } }, "400": { "description": "400", "content": { "application/json": { "examples": { "Result": { "value": "{ errors: [ { error_type: 'error_type', error_message: 'error_message', path: 'path' } ] }" } } } } }, "409": { "description": "409", "content": { "application/json": { "examples": { "Result": { "value": "{ errors: [ { error_type: 'CONNECTED_NATIVE_PLATFORM', error_message: 'The account is connected to some native platform', } ] }" } } } } } }, "deprecated": false } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### Create Product Source: https://developers.rdstation.com/reference/crm-v1-products Create a new product with its name, description, and base price. The name is mandatory and must be unique. ```APIDOC ## Create Product ### Description Create a new product with its name, description, and base price. The name is mandatory and must be unique. ### Method POST ### Endpoint /products ### Parameters #### Request Body - **name** (String) - Required - Product name. Must be at least 2 characters and at most 255 characters. Cannot be repeated. Only required when creating a product. - **description** (String) - Optional - Product description. - **base_price** (Number) - Optional - Product base price. Defaults to 0.0. ``` -------------------------------- ### List Contacts Example Source: https://developers.rdstation.com/crm Example of how to list contacts using the RD Station CRM API v2. ```APIDOC ## GET /contacts ### Description Retrieves a list of contacts from the RD Station CRM. ### Method GET ### Endpoint https://api.rd.services/crm/v2/contacts ### Response #### Success Response (200) - **data** (Array) - A list of contact objects. - **links** (Object) - Pagination and navigation links. #### Response Example ```json { "data": [ { "id": "12345", "name": "John Doe", "email": "john.doe@example.com" } ], "links": { "next": "https://api.rd.services/crm/v2/contacts?page=2" } } ``` ``` -------------------------------- ### Pagination Example URL Source: https://developers.rdstation.com/crm Use `page[number]` and `page[size]` query parameters to navigate through paginated results. These parameters are passed as URL query parameters. ```url https://api.rd.services/crm/v2/contacts?page[number]=2&page[size]=10 ``` -------------------------------- ### Request Example for Conversion Event Source: https://developers.rdstation.com/reference/conversao This example demonstrates how to structure a request payload for a conversion event, including contact details, company information, traffic source, tags, and legal bases. ```json { "event_type": "CONVERSION", "event_family": "CDP", "payload": { "conversion_identifier": "Name of the conversion event", "name": "Nome", "email": "email@email.com", "job_title": "job title value", "state": "state of the contact", "city": "city of the contact", "country": "country of the contact", "personal_phone": "phone of the contact", "mobile_phone": "mobile_phone of the contact", "twitter": "twitter handler of the contact", "facebook": "facebook name of the contact", "linkedin": "linkedin user name of the contact", "website": "website of the contact", "cf_custom_field_name": "custom field value", "company_name": "company name", "company_site": "company website", "company_address": "company address", "client_tracking_id": "lead tracking client_id", "traffic_source": "Google", "traffic_medium": "cpc", "traffic_campaign": "easter-50-off", "traffic_value": "easter eggs", "tags": [ "mql", "prospecção" ], "available_for_mailing": true, "legal_bases": [ { "category": "communications", "type": "consent", "status": "granted" } ] } } ``` -------------------------------- ### Ordering Example URL Source: https://developers.rdstation.com/crm Order results using the `sort[property]=direction` parameter, where `direction` can be `asc` (ascending) or `desc` (descending). The `links` in list responses will include these sorting parameters. ```url https://api.rd.services/crm/v2/contacts?sort[created_at]=asc ``` -------------------------------- ### Invalid Data Type Example Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Example of an error (Status 422) when an invalid data type is provided for a field. ```APIDOC ### Invalid data type If an invalid data type is sent. `Status 422 Unprocessable Entity` #### Example ```json { "errors": { "name": [ { "error_type": "MUST_BE_STRING", "error_message": "Name must be string." } ] } } ``` ``` -------------------------------- ### Required Parameter Example Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Example of an error (Status 422) when a required parameter like 'subject' is missing during task creation. ```APIDOC ### Required Parameter When creating a Task without the required `"subject"` parameter. `422 Unprocessable Entity` #### Example ```json { "errors": { "subject": [ "Assunto está muito curto, use no mínimo 3 caracteres." ] } } ``` ``` -------------------------------- ### Pagination Example Source: https://developers.rdstation.com/crm Endpoints that return lists of resources use pagination. Use the `page[number]` and `page[size]` query parameters to navigate through results. The `links` property in the response provides navigation URLs. ```APIDOC ## GET /contacts ### Description Retrieves a paginated list of contacts. ### Method GET ### Endpoint https://api.rd.services/crm/v2/contacts ### Query Parameters - **page[number]** (Integer) - Optional - Indicates the page to be returned. Default: `1`. - **page[size]** (Integer) - Optional - Indicates the quantity of objects to be returned on each page. Default: `20`. ### Request Example ``` https://api.rd.services/crm/v2/contacts?page[number]=2&page[size]=10 ``` ### Response Example ```json { "data": [ /* { ... }, ... */ ], "links": { "first": "https://api.rd.services/crm/v2/contacts?page[number]=1&page[size]=10", "prev": "https://api.rd.services/crm/v2/contacts?page[number]=1&page[size]=10", "self": "https://api.rd.services/crm/v2/contacts?page[number]=2&page[size]=10", "next": "https://api.rd.services/crm/v2/contacts?page[number]=3&page[size]=10", "last": "https://api.rd.services/crm/v2/contacts?page[number]=9&page[size]=10" } } ``` ``` -------------------------------- ### Rate Limit Exceeded Example Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Example of a Rate Limit Exceeded error (Status 429) when the API request limit is surpassed. ```APIDOC ### Rate Limit Exceeded When the API request limit is exceeded. `Status 429 Too Many Requests` ``` -------------------------------- ### Invalid Parameter Example (Task Type) Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Example of an error (Status 422) when an invalid 'type' parameter is provided during task creation. ```APIDOC ### Invalid Parameter If an invalid parameter is sent in the `type` field when trying to create Tasks. `Status 422 Unprocessable Entity` #### Example ```json { "errors": { "type": [ "Não está incluído na lista." ] } } ``` ``` -------------------------------- ### Inexistent Fields Example (Custom Field ID) Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Example of an error (Status 400) when an invalid custom field ID is provided. ```APIDOC ### Inexistent fields When the value sent in the custom field `id` is invalid. `Status 400 Bad Request` #### Example ```json { "errors": "Could not find a custom field that matches: {:custom_field_id=>\"XXXXXXXXXXXXXXXXX\"}" } ``` ``` -------------------------------- ### Erro: Internal Server Error (500) Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Mensagem genérica exibida em caso de problemas técnicos inesperados no servidor. Recomenda-se tentar novamente em alguns minutos. ```html

Problemas técnicos são sempre inesperados, mas estamos correndo para voltar a funcionar perfeitamente. Tente de novo em alguns minutos.

``` -------------------------------- ### Internal Server Error Example Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Example of an Internal Server Error (Status 500) which typically indicates temporary service unavailability. ```APIDOC ### Internal Server Error If an invalid parameter is sent in a request. `500 Internal Server Error` #### Example ```html

Problemas técnicos são sempre inesperados, mas estamos correndo para voltar a funcionar perfeitamente. Tente de novo em alguns minutos.

``` ``` -------------------------------- ### Erro: Resource Not Found (404) Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Ocorre se o recurso solicitado não existe, o Token não tem permissão de visibilidade, ou o ID fornecido é inválido. ```json { "errors": { "error_type": "RESOURCE_NOT_FOUND", "error_message": "Lead not found." } } ``` -------------------------------- ### Unauthorized Request Example Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Example of an Unauthorized Request error (Status 401) when the user's token is missing, invalid, or disabled. ```APIDOC ### Unauthorized Request If the user's Token is not passed in the Query, if the Token is **invalid**, or **disabled**. `Status 401 Unauthorized` #### Example ```json { "error": "Permission denied." } ``` ``` -------------------------------- ### Construct Authorization URL Source: https://developers.rdstation.com/reference/crm-v2-authentication-step-2 Replace `YOUR_CLIENT_ID` and `YOUR_REDIRECT_URI` with your application's credentials obtained in the previous step. Ensure the `redirect_uri` exactly matches the one registered in your application. ```text https://accounts.rdstation.com/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI ``` -------------------------------- ### API v1 Event Request Example Source: https://developers.rdstation.com/reference/rdsm-como-migrar-api-v1-para-api-v2 This is an example of a request to the API v1 for creating an event. It includes the endpoint, method, and payload structure. ```json { "auth_token":"4e14....642", "lead": { "lifecycle_stage": 1, "opportunity": true } } ``` -------------------------------- ### Unauthorized Request Example Source: https://developers.rdstation.com/reference/mensagens-de-erro-rdsm This example shows the JSON response structure for an unauthorized request, typically due to invalid, expired, or insufficient credentials. ```APIDOC ## Unauthorized Request If the token or credentials are invalid, the code is expired, or the user is not authorized. `Status 401 Unauthorized` #### Example ```json { "errors": [ { "error_type": "UNAUTHORIZED", "error_message": "Invalid token." }, { "error_type": "ACCESS_DENIED", "error_message": "Wrong credentials provided." }, { "error_type": "EXPIRED_CODE_GRANT", "error_message": "The authorization code grant has expired." }, { "error_type": "INVALID_REFRESH_TOKEN", "error_message": "The provided refresh token is invalid or was revoked." } ] } ``` ``` -------------------------------- ### Contact Creation Success Example Source: https://developers.rdstation.com/reference/crm-v1-create-contact Illustrates a successful contact creation response, showing a fully populated contact object with all relevant fields, including nested objects for birthday, organization, and communication details. ```json { "_id": "ID", "birthday": { "_id": "64ed320a4f5846000d6c2eaa", "day": 11, "month": 9, "year": 1979 }, "contact_custom_fields": [ { "_id": "64ed320a4f5846000d6c2ea9", "custom_field_id": "646e73a3651e44000f352486", "value": "Valor X" } ], "created_at": "2023-08-28T20:47:22.516-03:00", "deal_ids": [ "64dccdc7902ce80001d9fa9f", "64da562812a6310001baa2a4" ], "emails": [ { "_id": "64ed320a4f5846000d6c2ea8", "email": "fulano@email.com.br" } ], "facebook": "facebook do contato", "id": "ID", "legal_bases": [ { "category": "communications", "status": "granted", "type": "vital_interest" } ], "linkedin": "linkedin do contato", "name": "NAME", "organization": { "_id": "64ca5196268ec600013bac1b", "name": "4 Dimensão Logística" }, "organization_id": "64ca5196268ec600013bac1b", "phones": [ { "_id": "64ed320a4f5846000d6c2ea1", "phone": "1111111111", "type": "home" } ] } ``` -------------------------------- ### Inexistent Fields Example (Date Parameter) Source: https://developers.rdstation.com/reference/crm-v1-mensagens-de-erro Example of an error (Status 422) when the 'date' parameter for task creation is outside the allowed range. ```APIDOC ### Inexistent fields If the `"date"` parameter when creating a task is filled with a date in a period greater than 4 years from the task creation date. `Status 422 Unprocessable Entity` #### Example ```json { "errors": { "date": [ "Não é válido." ] } } ``` ``` -------------------------------- ### MEDIA_PLAYBACK_STOPPED Event Request Example Source: https://developers.rdstation.com/reference/evento-termino-playback-midia This example demonstrates the structure of a request payload for the MEDIA_PLAYBACK_STOPPED event. It includes all relevant fields for tracking media consumption. ```json { "event_type": "MEDIA_PLAYBACK_STOPPED", "event_family": "CDP", "payload": { "email": "contato@email.com", "name": "RD Station Developer", "company_name": "RD Station", "company_site": "https://site-contato.rdstation.com", "job_title": "Desenvolvedor", "personal_phone": "+55 48 3037-3600", "mobile_phone": "+55 48 3037-3600", "twitter": "https://twitter.com/contato", "facebook": "https://www.facebook.com/contato", "linkedin": "https://www.linkedin.com/in/contato", "website": "https://site-contato.rdstation.com", "media_type": "Video", "media_metadata": "https://www.mycompany.com/videos/c9266675-f484-44a7-9ad1-e43a080a8545", "media_identifier": "c9266675-f484-44a7-9ad1-e43a080a8545", "media_category": "Marketing", "media_finished": true, "media_recorded_content": true, "media_duration": 58, "media_published_date_timestamp": "2019-03-11T14:53:42.928Z", "media_user_interaction_duration": 30, "media_user_interaction_percentage": 30, "media_user_interaction_date_timestamp": "2019-03-15T14:53:42.928Z", "legal_bases": [ { "category": "communications", "type": "consent", "status": "granted" } ] } } ```