### Get Opportunities List Response Source: https://api.agilize.app/docs Example response structure for the GET /crm/lead/lead endpoint. Returns a paginated list of opportunities with detailed contact, automation, and UTM tracking information. ```json { "total": 0, "limit": 0, "skip": 0, "data": [{ "name": "string", "phones": [{"phone": "string", "itemType": 0}], "emails": [{"email": "string", "itemType": 0}], "utm": { "provider": "string", "campaign": "string" }, "createdAt": "2019-08-24T14:15:22Z" }] } ``` -------------------------------- ### GET /crm/lead/archiveReason Source: https://api.agilize.app/docs Retrieves a paginated list of lead archive reasons. ```APIDOC ## GET /crm/lead/archiveReason ### Description Fetches a list of reasons for archiving leads with support for filtering and pagination. ### Method GET ### Endpoint https://api.agilize.app/crm/lead/archiveReason ### Parameters #### Query Parameters - **$limit** (integer) - Optional - Number of results to return - **$skip** (integer) - Optional - Number of results to skip - **filter** (object) - Optional - Query parameters to filter results ### Response #### Success Response (200) - **total** (integer) - Total count - **data** (Array) - List of archive reasons #### Response Example { "total": 0, "data": [{"name": "string"}] } ``` -------------------------------- ### GET /messenger/meta/phone Source: https://api.agilize.app/docs Retrieves a list of registered WhatsApp phone numbers. ```APIDOC ## GET /messenger/meta/phone ### Description Search and list WhatsApp phone registrations. ### Method GET ### Endpoint https://api.agilize.app/messenger/meta/phone ### Parameters #### Query Parameters - **$limit** (integer) - Optional - Number of results - **$skip** (integer) - Optional - Number of results to skip ### Response #### Success Response (200) - **total** (integer) - Total count - **data** (array) - List of phone objects ``` -------------------------------- ### List Lead Sources API Endpoint (curl) Source: https://api.agilize.app/docs This example shows how to retrieve a list of lead sources from the Agilize API. It allows for pagination using $limit and $skip, sorting with $sort, and filtering. An API key is required in the headers. ```curl curl -X GET \ 'https://api.agilize.app/crm/lead/source?limit=10&skip=0' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'content-type: application/json' ``` -------------------------------- ### Create Lead Source API Endpoint (curl) Source: https://api.agilize.app/docs This example demonstrates how to create a new lead source using the Agilize API. It requires the source name and color in the request body and an API key in the headers. The endpoint returns the created source details upon success. ```curl curl -X POST \ https://api.agilize.app/crm/lead/source \ -H 'x-api-key: YOUR_API_KEY' \ -H 'content-type: application/json' \ -d '{ "name": "string", "color": "string" }' ``` -------------------------------- ### GET /crm/lead/source Source: https://api.agilize.app/docs Retrieves a paginated list of opportunity sources based on optional filters. ```APIDOC ## GET /crm/lead/source ### Description Fetch a list of opportunity sources with support for pagination and filtering. ### Method GET ### Endpoint https://api.agilize.app/crm/lead/source ### Parameters #### Query Parameters - **$limit** (integer) - Optional - Number of results to return - **$skip** (integer) - Optional - Number of results to skip - **$sort** (object) - Optional - Property to sort results - **filter** (object) - Optional - Query parameters to filter results #### Header Parameters - **x-api-key** (string) - Required - Integration API key ### Response #### Success Response (200) - **total** (integer) - Total count of records - **data** (array) - List of source objects #### Response Example { "total": 0, "data": [ { "name": "string", "color": "string" } ] } ``` -------------------------------- ### GET /voice/pbx/cdr/download Source: https://api.agilize.app/docs Allows downloading a specific call recording file based on the unique CDR ID. ```APIDOC ## GET /voice/pbx/cdr/download ### Description Downloads a recording file. Note: There is a monthly limit of 20,000 downloads. ### Method GET ### Endpoint https://api.agilize.app/voice/pbx/cdr/download ### Parameters #### Query Parameters - **uniqueid** (string) - Required - Unique ID associated with the CDR #### Header Parameters - **x-api-key** (string) - Required - API integration key ### Response #### Success Response (200) - File binary stream #### Error Response (405) - Limit exceeded error message ``` -------------------------------- ### GET /messenger/chat/messageTemplate Source: https://api.agilize.app/docs Retrieves a list of message templates with options for pagination, sorting, and filtering. ```APIDOC ## GET /messenger/chat/messageTemplate ### Description Retrieves a list of message templates. Supports pagination, sorting, and filtering by messenger, chat, or message template. ### Method GET ### Endpoint https://api.agilize.app/messenger/chat/messageTemplate ### Parameters #### Query Parameters - **$limit** (integer) - Optional - Number of results to return. - **$skip** (integer) - Optional - Number of results to skip. - **$sort** (object) - Optional - Property to sort results. - **filter** (object) - Optional - Query parameters to filter (messenger/chat/messageTemplate). #### Header Parameters - **x-api-key** (string) - Required - API key for integration. - **content-type** (string) - Required - Application type, should be application/json. ### Response #### Success Response (200) - **total** (integer) - The total number of message templates available. - **limit** (integer) - The limit of results returned per page. - **skip** (integer) - The number of results skipped. - **data** (array) - An array of message template objects. - **name** (string) - The name of the message template. - **language** (string) - The language of the message template. - **category** (string) - The category of the message template. - **bodyText** (string) - The plain text body of the message. - **body** (object) - The structured body of the message (e.g., for rich media). - **header** (object) - The header content of the message. - **footer** (object) - The footer content of the message. - **buttons** (array) - An array of buttons for the message. - **business** (string) - The business identifier. - **phone** (string) - The associated phone number. - **waTemplateId** (string) - The WhatsApp template ID. - **waStatus** (string) - The WhatsApp template status. - **waReason** (string) - The reason for the WhatsApp template status. - **useCount** (number) - The number of times the template has been used. - **qualityScore** (string) - The quality score of the template. - **deleted** (boolean) - Indicates if the template is deleted. - **hasPaymentBtn** (boolean) - Indicates if the template has a payment button. #### Error Response (401) - Not authenticated. #### Error Response (500) - General error. ### Response Example (200) ```json { "total": 0, "limit": 0, "skip": 0, "data": [ { "name": "string", "language": "string", "category": "string", "bodyText": "string", "body": {}, "header": {}, "footer": {}, "buttons": [ {} ], "business": "string", "phone": "string", "waTemplateId": "string", "waStatus": "string", "waReason": "string", "useCount": 0, "qualityScore": "string", "deleted": true, "hasPaymentBtn": true } ] } ``` ``` -------------------------------- ### GET /messenger/meta/phone/{_id} Source: https://api.agilize.app/docs Retrieves the registration details for a specific WhatsApp number. It requires the WhatsApp ID as a path parameter and an API key for authentication. ```APIDOC ## GET /messenger/meta/phone/{_id} ### Description Retrieves the registration details for a specific WhatsApp number. It requires the WhatsApp ID as a path parameter and an API key for authentication. ### Method GET ### Endpoint /messenger/meta/phone/{_id} ### Parameters #### Path Parameters - **_id** (integer) - Required - ID of WhatsApp to return #### Header Parameters - **x-api-key** (string) - Required - API key for integration generated in your management panel. - **content-type** (string) - Required - application/json ### Response #### Success Response (200) - **phone** (string) - The phone number. - **phoneNumberId** (string) - The unique identifier for the phone number. - **status** (string) - The current status of the registration. - **business** (string) - The associated business name. - **flow** (string) - The associated flow identifier. - **users** (Array of strings) - List of associated user identifiers. - **meta** (object) - Additional metadata. - **isRegistered** (boolean) - Indicates if the number is registered. - **integrationType** (string) - The type of integration. - **sendAgentName** (boolean) - Flag to indicate if the agent's name should be sent. - **name** (string) - The name of the contact or entity. - **department** (string) - The department associated with the contact. - **isToGenCase** (boolean) - Flag to indicate if a case should be generated. - **lastDailyDt** (string ) - The timestamp of the last daily activity. - **currDailySend** (number) - The current count of daily sends. - **maxDailySend** (number) - The maximum allowed daily sends. - **registerLastAttemptAt** (string ) - The timestamp of the last registration attempt. - **registerLastError** (object) - Information about the last registration error. - **message** (string) - The error message. - **code** (number) - The error code. - **deleted** (boolean) - Indicates if the record is deleted. #### Error Responses - **401** - Not authenticated - **404** - Not found - **500** - General error ### Response Example ```json { "phone": "string", "phoneNumberId": "string", "status": "string", "business": "string", "flow": "string", "users": [ "string" ], "meta": { }, "isRegistered": true, "integrationType": "string", "sendAgentName": true, "name": "string", "department": "string", "isToGenCase": true, "lastDailyDt": "2019-08-24T14:15:22Z", "currDailySend": 0, "maxDailySend": 0, "registerLastAttemptAt": "2019-08-24T14:15:22Z", "registerLastError": { "message": "string", "code": 0 }, "deleted": true } ``` ``` -------------------------------- ### Delete Lead API Endpoint (curl) Source: https://api.agilize.app/docs This example demonstrates how to delete a lead record using the Agilize API. It requires the lead's ID in the path and an API key in the headers. The endpoint supports JSON content type. ```curl curl -X DELETE \ https://api.agilize.app/crm/lead/lead/{_id} \ -H 'x-api-key: YOUR_API_KEY' \ -H 'content-type: application/json' ``` -------------------------------- ### List Chat Rooms Request (GET) Source: https://api.agilize.app/docs This endpoint retrieves a list of chat rooms. It supports query parameters for limiting results, skipping records, sorting, and filtering by messenger, chat, or room. An 'x-api-key' is required for authentication. ```http GET https://api.agilize.app/messenger/chat/room?limit=10&skip=0&sort={}&filter={} Header: x-api-key: YOUR_API_KEY content-type: application/json ``` -------------------------------- ### Get SMS Message by ID - GET /messenger/sms/send/{_id} Source: https://api.agilize.app/docs Retrieves a specific SMS message by its ID. Requires the message ID in the path and an API key in the headers. Returns the SMS message details. ```json { "phone": "11912341234", "content": "string", "user": "string", "room": "string", "dt": "2019-08-24T14:15:22Z", "extId": "string", "hasReply": true, "extCodStaDetail": "string", "extCodSta": "string", "pendingRev": true } ``` -------------------------------- ### POST /webhook/opportunity-source/create Source: https://api.agilize.app/docs Creates a new opportunity source record. ```APIDOC ## POST /webhook/opportunity-source/create ### Description Registers a new opportunity source in the system. ### Method POST ### Endpoint /webhook/opportunity-source/create ### Request Body - **name** (string) - Required - Name of the source - **color** (string) - Required - Color identifier ### Request Example { "name": "string", "color": "string" } ### Response #### Success Response (200) - **status** (string) - Return a 200 status to indicate that the data was received successfully ``` -------------------------------- ### POST /user/user Source: https://api.agilize.app/docs Creates a new user with the provided details. Requires API key and content type headers. ```APIDOC ## POST /user/user ### Description Creates a new user with the provided details. Requires API key and content type headers. ### Method POST ### Endpoint https://api.agilize.app/user/user ### Parameters #### Header Parameters - **x-api-key** (string) - Required - API key for integration. - **content-type** (string) - Required - Must be 'application/json'. #### Request Body - **name** (string) - Required - **email** (string) - Required - **password** (string) - Required - **group** (string) - Required - **ownerCompany** (string) - Required - **currentProject** (string) - Required - **primaryTeamOrg** (string) - Required - **isTeamSupervisor** (boolean) - Required - **role** (string) - Required - **additionalInfo** (object) - Optional - **projects** (Array of strings) - Optional - **guest** (boolean) - Optional - **isVerified** (boolean) - Optional - **isActive** (boolean) - Optional - **deleted** (boolean) - Optional - **verifyToken** (string) - Optional - **resetShortToken** (string) - Optional - **resetToken** (string) - Optional - **resetAttempts** (number) - Optional - **resetExpires** (string ) - Optional - **verifyExpires** (string ) - Optional - **resources** (object) - Optional - **wallet** (string) - Optional - **profilePicture** (string) - Optional - **googleId** (string) - Optional - **facebookId** (string) - Optional - **nounce** (string) - Optional - **fileAvatar** (string) - Optional - **isAdmin** (boolean) - Optional - **avatarName** (string) - Optional - **avatarModel** (string) - Optional - **isChatAgent** (boolean) - Optional - **dialMode** (number) - Optional - **enableWebrtc** (boolean) - Optional - **isOwnOnlyAgent** (boolean) - Optional - **notify** (object) - Optional - **workStatus** (object) - Optional - **tokenVersion** (number) - Optional - **tokensInvalidatedAt** (string ) - Optional ### Request Example ```json { "name": "string", "email": "string", "password": "string", "group": "string", "ownerCompany": "string", "currentProject": "string", "primaryTeamOrg": "string", "isTeamSupervisor": true, "role": "string", "additionalInfo": { }, "projects": [ "string" ], "guest": true, "isVerified": true, "isActive": true, "deleted": true, "verifyToken": "string", "resetShortToken": "string", "resetToken": "string", "resetAttempts": 0, "resetExpires": "2019-08-24T14:15:22Z", "verifyExpires": "2019-08-24T14:15:22Z", "resources": { }, "wallet": "string", "profilePicture": "string", "googleId": "string", "facebookId": "string", "nounce": "string", "fileAvatar": "string", "isAdmin": true, "avatarName": "string", "avatarModel": "string", "isChatAgent": true, "dialMode": 0, "enableWebrtc": true, "isOwnOnlyAgent": true, "notify": { }, "workStatus": { "key": "string", "reasonId": "string", "reasonName": "string", "updatedAt": "2019-08-24T14:15:22Z" }, "tokenVersion": 0, "tokensInvalidatedAt": "2019-08-24T14:15:22Z" } ``` ### Response #### Success Response (201) - **name** (string) - Description of the created user's name. - **email** (string) - Description of the created user's email. - **password** (string) - Description of the created user's password. - **group** (string) - Description of the created user's group. - **ownerCompany** (string) - Description of the owner company. - **currentProject** (string) - Description of the current project. - **primaryTeamOrg** (string) - Description of the primary team organization. - **isTeamSupervisor** (boolean) - Indicates if the user is a team supervisor. - **role** (string) - Description of the user's role. - **additionalInfo** (object) - Additional information about the user. - **projects** (Array of strings) - List of projects the user is associated with. - **guest** (boolean) - Indicates if the user is a guest. - **isVerified** (boolean) - Indicates if the user is verified. - **isActive** (boolean) - Indicates if the user account is active. - **deleted** (boolean) - Indicates if the user account is deleted. - **verifyToken** (string) - Token for user verification. - **resetShortToken** (string) - Short token for password reset. - **resetToken** (string) - Token for password reset. - **resetAttempts** (number) - Number of password reset attempts. - **resetExpires** (string ) - Expiration date for password reset. - **verifyExpires** (string ) - Expiration date for verification. - **resources** (object) - User resources. - **wallet** (string) - User's wallet information. - **profilePicture** (string) - URL to the user's profile picture. - **googleId** (string) - User's Google ID. - **facebookId** (string) - User's Facebook ID. - **nounce** (string) - Nounce value. - **fileAvatar** (string) - User's avatar file name. - **isAdmin** (boolean) - Indicates if the user is an administrator. - **avatarName** (string) - Name of the user's avatar. - **avatarModel** (string) - Model of the user's avatar. - **isChatAgent** (boolean) - Indicates if the user is a chat agent. - **dialMode** (number) - User's dial mode. - **enableWebrtc** (boolean) - Indicates if WebRTC is enabled for the user. - **isOwnOnlyAgent** (boolean) - Indicates if the user is an own-only agent. - **notify** (object) - Notification settings for the user. - **workStatus** (object) - User's work status details. - **tokenVersion** (number) - Version of the user's token. - **tokensInvalidatedAt** (string ) - Timestamp when tokens were invalidated. #### Error Responses - **401** - Not authenticated. - **429** - Rate limit exceeded. - **500** - General error. #### Response Example (201) ```json { "name": "string", "email": "string", "password": "string", "group": "string", "ownerCompany": "string", "currentProject": "string", "primaryTeamOrg": "string", "isTeamSupervisor": true, "role": "string", "additionalInfo": { }, "projects": [ "string" ], "guest": true, "isVerified": true, "isActive": true, "deleted": true, "verifyToken": "string", "resetShortToken": "string", "resetToken": "string", "resetAttempts": 0, "resetExpires": "2019-08-24T14:15:22Z", "verifyExpires": "2019-08-24T14:15:22Z", "resources": { }, "wallet": "string", "profilePicture": "string", "googleId": "string", "facebookId": "string", "nounce": "string", "fileAvatar": "string", "isAdmin": true, "avatarName": "string", "avatarModel": "string", "isChatAgent": true, "dialMode": 0, "enableWebrtc": true, "isOwnOnlyAgent": true, "notify": { }, "workStatus": { "key": "string", "reasonId": "string", "reasonName": "string", "updatedAt": "2019-08-24T14:15:22Z" }, "tokenVersion": 0, "tokensInvalidatedAt": "2019-08-24T14:15:22Z" } ``` ``` -------------------------------- ### GET /crm/company/company Source: https://api.agilize.app/docs Retrieves a paginated list of company records from the CRM. ```APIDOC ## GET /crm/company/company ### Description Fetches a list of companies with support for filtering, sorting, and pagination. ### Method GET ### Endpoint https://api.agilize.app/crm/company/company ### Parameters #### Query Parameters - **$limit** (integer) - Optional - Number of results to return - **$skip** (integer) - Optional - Number of results to skip - **$sort** (object) - Optional - Property to sort results - **filter** (object) - Optional - Query parameters to filter #### Header Parameters - **x-api-key** (string) - Required - Chave da API de integração gerada em seu painel gerencial. ### Response #### Success Response (200) - **total** (integer) - Total count of records - **data** (array) - List of company objects #### Response Example { "total": 0, "data": [] } ``` -------------------------------- ### Create Archive Reason (POST) Source: https://api.agilize.app/docs Creates a new archive reason for leads. Requires a JSON payload containing the name of the reason. Authentication is handled via an x-api-key header. ```json { "name": "string" } ``` -------------------------------- ### GET /crm/timeline/timeline/{_id} Source: https://api.agilize.app/docs Retrieves a specific timeline record by its ID. ```APIDOC ## GET /crm/timeline/timeline/{_id} ### Description Retrieves a specific timeline record by its ID. ### Method GET ### Endpoint https://api.agilize.app/crm/timeline/timeline/{_id} ### Parameters #### Path Parameters - **_id** (integer) - Required - ID of the timeline record to retrieve. #### Header Parameters - **x-api-key** (string) - Required - API integration key generated in your management panel. - **content-type** (string) - Required - application/json ### Responses #### Success Response (200) - **contact** (string) - Contact associated with the record. - **lead** (string) - Lead associated with the record. - **task** (string) - Task associated with the record. - **pipeline** (string) - Pipeline associated with the record. - **pipelineItem** (string) - Pipeline item associated with the record. - **pipelineStage** (string) - Pipeline stage associated with the record. - **user** (string) - User associated with the record. - **tags** (array of strings) - Tags associated with the record. - **begin** (string) - Start date and time of the record. - **end** (string) - End date and time of the record. - **source** (string) - Source of the record. - **note** (string) - Notes for the record. - **_i** (object) - Internal data. - **_** (object) - Internal data. - **_integration** (object) - Integration data. #### Error Responses - **401** - Not authenticated. - **404** - Not found. - **500** - General error. ### Response Example (200) ```json { "contact": "string", "lead": "string", "task": "string", "pipeline": "string", "pipelineItem": "string", "pipelineStage": "string", "user": "string", "tags": [ "string" ], "begin": "2019-08-24T14:15:22Z", "end": "2019-08-24T14:15:22Z", "source": "string", "note": "string", "_i": {}, "_": {}, "_integration": {} } ``` ``` -------------------------------- ### POST /webhook/chat-room/create Source: https://api.agilize.app/docs Creates a new chat room record. ```APIDOC ## POST /webhook/chat-room/create ### Description Initializes a new chat room session with associated metadata. ### Method POST ### Endpoint /webhook/chat-room/create ### Request Body - **guest** (string) - Required - Guest identifier - **users** (Array) - Required - List of users - **department** (string) - Optional - Current department - **chSrc** (number) - Required - Channel type (1: WhatsApp, 2: Facebook, 3: Instagram, 4: SMS) ### Request Example { "guest": "string", "users": [], "department": "string" } ### Response #### Success Response (200) - **status** (string) - Return a 200 status to indicate that the data was received successfully ``` -------------------------------- ### GET /messenger/whatsapp/send/{_id} Source: https://api.agilize.app/docs Retrieves a specific WhatsApp message record by its ID. ```APIDOC ## GET /messenger/whatsapp/send/{_id} ### Description Retrieves a specific WhatsApp message record by its ID. ### Method GET ### Endpoint /messenger/whatsapp/send/{_id} ### Path Parameters - **_id** (integer) - Required - ID of the WhatsApp message record to retrieve ### Header Parameters - **x-api-key** (string) - Required - API key for integration - **content-type** (string) - Required - application/json ### Responses #### Success Response (200) - **destination** (string) - Destination phone number - **phone** (string) - Originating WhatsApp phone ID - **varHeader** (string) - Header variable for the template - **varsBody** (array of strings) - Body variables for the template - **varOrder** (string) - Order variable - **template** (string) - Template ID - **dt** (string) - Date and time of the message - **extId** (string) - External ID of the message - **status** (integer) - Status code of the message #### Error Response (401) - Not authenticated #### Error Response (404) - Not found #### Error Response (500) - General error ``` -------------------------------- ### GET /messenger/sms/send/{_id} Source: https://api.agilize.app/docs Retrieves a specific sent SMS message by its ID. ```APIDOC ## GET /messenger/sms/send/{_id} ### Description Retrieves a specific sent SMS message by its ID. ### Method GET ### Endpoint https://api.agilize.app/messenger/sms/send/{_id} ### Parameters #### Path Parameters - **_id** (integer) - Required - The unique identifier of the SMS message to retrieve. #### Header Parameters - **x-api-key** (string) - Required - Integration API key generated in your management panel. - **content-type** (string) - Required - Must be set to application/json. ### Response #### Success Response (200) - **phone** (string) - The recipient's phone number. - **content** (string) - The content of the SMS message. - **user** (string) - The user who sent the message. - **room** (string) - The room associated with the message. - **dt** (string) - The date and time the message was sent (ISO 8601 format). - **extId** (string) - External ID of the message. - **hasReply** (boolean) - Indicates if the message has a reply. - **extCodStaDetail** (string) - Detailed status code description. - **extCodSta** (string) - Status code. - **pendingRev** (boolean) - Indicates if the message is pending revision. #### Response Example ```json { "phone": "11912341234", "content": "string", "user": "string", "room": "string", "dt": "2019-08-24T14:15:22Z", "extId": "string", "hasReply": true, "extCodStaDetail": "string", "extCodSta": "string", "pendingRev": true } ``` ``` -------------------------------- ### Agilize API Lead Source List Response Sample (JSON) Source: https://api.agilize.app/docs This is a sample JSON response when listing lead sources from the Agilize API. It includes the total number of sources, pagination details (limit and skip), and an array of source objects, each with a name and color. ```json { "total": 0, "limit": 0, "skip": 0, "data": [ { "name": "string", "color": "string" } ] } ``` -------------------------------- ### Webhook - Origem Oportunidade - Criação Source: https://api.agilize.app/docs Handles the creation of a new Origem Oportunidade (Opportunity Source) via webhook, including its name and color. ```APIDOC ## Webhook - Origem Oportunidade - Criação ### Description Handles the creation of a new Origem Oportunidade (Opportunity Source) via webhook, including its name and color. ### Method POST ### Endpoint /webhook/origemoportunidade/criacao ### Parameters #### Request Body - **name** (string) - Required - The name of the opportunity source. - **color** (string) - Optional - The color associated with the opportunity source. ### Request Example ```json { "name": "string", "color": "string" } ``` ### Response #### Success Response (200) Returns a 200 status to indicate that the data was received successfully. ``` -------------------------------- ### GET /crm/company/company/{_id} Source: https://api.agilize.app/docs Retrieves a specific company record by its unique identifier. ```APIDOC ## GET /crm/company/company/{_id} ### Description Retrieves the details of a specific company record using its ID. ### Method GET ### Endpoint https://api.agilize.app/crm/company/company/{_id} ### Parameters #### Path Parameters - **_id** (integer) - Required - ID of Empresa to return #### Header Parameters - **x-api-key** (string) - Required - Integration API key - **content-type** (string) - Required - application/json ### Response #### Success Response (200) - **name** (string) - Company name - **createdAt** (string) - Creation timestamp #### Response Example { "name": "string", "createdAt": "2019-08-24T14:15:22Z" } ``` -------------------------------- ### GET /messenger/sms/send Source: https://api.agilize.app/docs Retrieves a list of sent SMS messages with options for pagination and sorting. ```APIDOC ## GET /messenger/sms/send ### Description Retrieves a list of sent SMS messages with options for pagination and sorting. ### Method GET ### Endpoint https://api.agilize.app/messenger/sms/send ### Parameters #### Query Parameters - **$limit** (integer) - Optional - The maximum number of results to return. - **$skip** (integer) - Optional - The number of results to skip. - **$sort** (object) - Optional - Property to sort the results by. - **filter** (object) - Optional - Query parameters to filter the results (e.g., messenger/sms/send). #### Header Parameters - **x-api-key** (string) - Required - Integration API key generated in your management panel. - **content-type** (string) - Required - Must be set to application/json. ### Response #### Success Response (200) - **total** (integer) - The total number of messages. - **limit** (integer) - The limit applied to the results. - **skip** (integer) - The number of results skipped. - **data** (array) - An array of SMS message objects. - **phone** (string) - The recipient's phone number. - **content** (string) - The content of the SMS message. - **user** (string) - The user who sent the message. - **room** (string) - The room associated with the message. - **dt** (string) - The date and time the message was sent (ISO 8601 format). - **extId** (string) - External ID of the message. - **hasReply** (boolean) - Indicates if the message has a reply. - **extCodStaDetail** (string) - Detailed status code description. - **extCodSta** (string) - Status code. - **pendingRev** (boolean) - Indicates if the message is pending revision. #### Response Example ```json { "total": 0, "limit": 0, "skip": 0, "data": [ { "phone": "11912341234", "content": "string", "user": "string", "room": "string", "dt": "2019-08-24T14:15:22Z", "extId": "string", "hasReply": true, "extCodStaDetail": "string", "extCodSta": "string", "pendingRev": true } ] } ``` ``` -------------------------------- ### POST /messenger/meta/phone Source: https://api.agilize.app/docs Creates a new WhatsApp phone registration record. ```APIDOC ## POST /messenger/meta/phone ### Description Registers a new WhatsApp phone number. ### Method POST ### Endpoint https://api.agilize.app/messenger/meta/phone ### Parameters #### Request Body - **phone** (string) - Required - **phoneNumberId** (string) - Required - **business** (string) - Required ### Response #### Success Response (201) - **status** (string) - Created status ``` -------------------------------- ### Oportunidade - Busca e listagem de registros Source: https://api.agilize.app/docs Retrieves a list of opportunities with options for pagination, sorting, and filtering. Requires an API key for authorization. ```APIDOC ## Oportunidade - Busca e listagem de registros ### Description Retrieves a list of opportunities with options for pagination, sorting, and filtering. Requires an API key for authorization. ### Method GET ### Endpoint /crm/lead/lead ### Parameters #### Query Parameters - **$limit** (integer) - Optional - Number of results to return. - **$skip** (integer) - Optional - Number of results to skip. - **$sort** (object) - Optional - Property to sort results. - **filter** (object) - Optional - Query parameters to filter results (e.g., crm/lead/lead). #### Header Parameters - **x-api-key** (string) - Required - API integration key generated in your management panel. - **content-type** (string) - Required - Must be 'application/json'. ### Response #### Success Response (200) Returns a list of opportunities. #### Error Responses - **401** - Not authenticated. - **500** - General error. ### Response Example (200) ```json { "total": 0, "limit": 0, "skip": 0, "data": [ { "contacts": [ "string" ], "automations": [ "string" ], "companies": [ "string" ], "phones": [ { "phone": "string", "itemType": 0 } ], "emails": [ { "email": "string", "itemType": 0 } ], "socials": [ { "link": "string", "itemType": 0 } ], "name": "string", "user": "string", "createdBy": "string", "import": "string", "note": "string", "stage": "string", "funnel": "string", "source": "string", "archiveReason": "string", "ticket": 0, "score": 0, "tags": [ "string" ], "_": {}, "dtStage": "2019-08-24T14:15:22Z", "dueDt": "2019-08-24T14:15:22Z", "tlFinishedTasks": 0, "tlTimeline": 0, "pendTasks": [ { "dt": "2019-08-24T14:15:22Z" } ], "tlPendTasks": 0, "dtPendTask": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "system_source": "string", "utm": { "provider": "string", "clickId": "string", "campaignId": "string", "campaign": "string", "url": "string", "ref": "string" }, "transmissionList": [ "string" ], "ip_source": "string", "updatedAt": "2019-08-24T14:15:22Z" } ] } ``` ``` -------------------------------- ### GET /crm/contact/contact Source: https://api.agilize.app/docs Retrieves a list of contacts from the CRM. Supports pagination, sorting, and filtering. ```APIDOC ## GET /crm/contact/contact ### Description Retrieves a list of contacts from the CRM. Supports pagination, sorting, and filtering. ### Method GET ### Endpoint https://api.agilize.app/crm/contact/contact ### Parameters #### Query Parameters - **$limit** (integer) - Optional - The maximum number of results to return. - **$skip** (integer) - Optional - The number of results to skip for pagination. - **$sort** (object) - Optional - An object specifying the property to sort results by. - **filter** (object) - Optional - An object containing query parameters to filter the contacts (e.g., crm/contact/contact). #### Header Parameters - **x-api-key** (string) - Required - Your integration API key. - **content-type** (string) - Required - Must be 'application/json'. ### Response #### Success Response (200) - **total** (integer) - The total number of contacts available. - **limit** (integer) - The limit applied to the number of results. - **skip** (integer) - The number of results skipped. - **data** (Array of objects) - An array of contact objects. - **createdAt** (string) - The creation date of the contact (ISO 8601 format). - **name** (string) - The name of the contact. - **automations** (Array of strings) - List of associated automations. - **phones** (Array of objects) - List of phone numbers. - **phone** (string) - The phone number. - **itemType** (integer) - The type of phone number. - **emails** (Array of objects) - List of email addresses. - **email** (string) - The email address. - **itemType** (integer) - The type of email address. - **import** (string) - Import identifier. - **note** (string) - Notes about the contact. - **companies** (Array of objects) - List of associated companies. - **role** (string) - The role within the company. - **leads** (Array of strings) - List of associated leads. - **socials** (Array of objects) - List of social media links. - **link** (string) - The social media URL. - **itemType** (integer) - The type of social media link. - **user** (string) - The user associated with the contact. - **createdBy** (string) - The user who created the contact. - **userCompany** (string) - The company of the user. - **tags** (Array of strings) - Tags associated with the contact. - **_** (object) - Internal data. - **_integration** (object) - Integration-specific data. - **system_source** (string) - The system source of the contact. - **transmissionList** (Array of strings) - List of transmission lists. #### Response Example ```json { "total": 0, "limit": 0, "skip": 0, "data": [ { "createdAt": "2019-08-24T14:15:22Z", "name": "string", "automations": [ "string" ], "phones": [ { "phone": "string", "itemType": 0 } ], "emails": [ { "email": "string", "itemType": 0 } ], "import": "string", "note": "string", "companies": [ { "role": "string" } ], "leads": [ "string" ], "socials": [ { "link": "string", "itemType": 0 } ], "user": "string", "createdBy": "string", "userCompany": "string", "tags": [ "string" ], "_": { }, "_integration": { }, "system_source": "string", "transmissionList": [ "string" ] } ] } ``` ``` -------------------------------- ### POST /messenger/chat/room Source: https://api.agilize.app/docs Creates a new chat room instance in the messenger system. ```APIDOC ## POST /messenger/chat/room ### Description Creates a new chat room with the provided configuration, including user assignments, tags, and integration settings. ### Method POST ### Endpoint https://api.agilize.app/messenger/chat/room ### Request Body - **guest** (string) - Optional - Guest identifier - **users** (array) - Optional - List of user IDs - **owner** (string) - Optional - Room owner ID - **info** (object) - Optional - Contact information object (name, phone, email) - **utm** (object) - Optional - UTM tracking parameters ### Request Example { "guest": "string", "users": ["string"], "owner": "string" } ### Response #### Success Response (201) - **guest** (string) - Created chat room guest info #### Response Example { "guest": "string", "status": "created" } ```