### Retrieve Available Services (GET /api/v1/prices-info) Source: https://getatext.com/api-docs/index Retrieves a list of available services on the platform, including their API names, pricing, and stock information. Requires an API key for authentication. ```curl curl -X GET https://getatext.com/api/v1/prices-info \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ ``` -------------------------------- ### GET /stubs/handler_api.php Source: https://getatext.com/api-docs/index Handles collection requests for RENT A NUMBER, GET CODE, and CANCEL RENTAL operations. Requires an API key. ```APIDOC ## GET /stubs/handler_api.php ### Description Retrieves collection data for number rental, code retrieval, and rental cancellation. ### Method GET ### Endpoint https://getatext.com/stubs/handler_api.php ### Query Parameters - **api_key** (string) - Required - Your unique API key. - **action** (string) - Required - Specifies the operation to perform. Possible values: `getNumber`, `getCode`, `cancelRental`. ### Parameters based on action #### getNumber - **service** (string) - Required - The service for which to rent a number. #### getCode - **id** (string) - Required - The ID of the rental to retrieve the code for. #### setStatus - **id** (string) - Required - The ID of the rental to update. - **status** (integer) - Required - The status to set. Use `8` for cancellation. ``` -------------------------------- ### GET /api/v1/auctions Source: https://getatext.com/api-docs/index Retrieves a list of all active auctions currently available for bidding. Requires authentication. ```APIDOC ## GET /api/v1/auctions ### Description Retrieves all active auctions currently available for bidding. ### Method GET ### Endpoint https://getatext.com/api/v1/auctions ### Headers - **Auth** (string) - Required - Your API key for authentication. - **Content-Type** (string) - Required - `application/json` ### Response #### Success Response (200 OK) - **status** (string) - Indicates the status of the request ('success'). - **auctions** (array) - A list of active auctions. - **id** (integer) - The unique identifier for the auction. - **service_name** (string) - The name of the service associated with the auction. - **current_bid** (string) - The current highest bid amount. - **end_time** (string) - The timestamp when the auction ends. - **amount** (integer) - The starting amount or reserve price for the auction. ### Response Example ```json { "status": "success", "auctions": [ { "id": 1, "service_name": "Whatsapp", "current_bid": "0.55", "end_time": "2026-02-02 18:30:00", "amount": 100 } ] } ``` ``` -------------------------------- ### Retrieve User Balance (GET /api/v1/balance) Source: https://getatext.com/api-docs/index Retrieves the current balance of the authenticated user. Requires an API key for authentication. Returns the balance amount upon success. ```curl curl -X GET https://getatext.com/api/v1/balance \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ ``` -------------------------------- ### Retrieve Long Rentals (GET /api/v1/long-rentals) Source: https://getatext.com/api-docs/index Retrieves a list of the user's active long-term rentals. Requires an API key for authentication. Returns an array of long rental objects upon success. ```curl curl -X GET https://getatext.com/api/v1/long-rentals \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ ``` -------------------------------- ### GET /api/v1/auctions - Retrieve Active Auctions Source: https://getatext.com/api-docs/index Retrieves a list of all currently active auctions available for bidding. It requires an API key for authentication and returns auction details including service name, current bid, and end time. ```cURL curl -X GET https://getatext.com/api/v1/auctions \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" ``` -------------------------------- ### Retrieve Long Rental Messages (GET /api/v1/long-rentals/{id}/messages) Source: https://getatext.com/api-docs/index Retrieves messages associated with a specific long-term rental. Requires the rental ID in the URL and an API key for authentication. Returns an array of messages upon success. ```curl curl -X GET https://getatext.com/api/v1/long-rentals/{id}/messages \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ ``` -------------------------------- ### GET /stubs/handler_api.php - Manage Phone Numbers Source: https://getatext.com/api-docs/index This endpoint allows for managing virtual phone numbers. It supports operations like renting a number, retrieving a received code, and canceling a rental. Requires an API key for authentication and specifies service or ID depending on the operation. ```cURL curl -X GET https://getatext.com/stubs/handler_api.php?api_key=YOUR_API_KEY \ -H "Content-Type: application/json" \ ``` -------------------------------- ### Retrieve Available Services Source: https://getatext.com/api-docs/index This endpoint retrieves a list of all available services on the platform, including their pricing and stock information. ```APIDOC ## GET /api/v1/prices-info ### Description Use this endpoint to retrieve the available services in the platform. ### Method GET ### Endpoint /api/v1/prices-info ### Parameters #### Query Parameters This endpoint does not accept any query parameters. ### Request Example ```json { "example": "No request body needed for this endpoint." } ``` ### Response #### Success Response (200 OK) - **service_name** (string) - The name of the service. - **api_name** (string) - The API name for the service. - **multiple_sms** (string) - Indicates if the service supports multiple SMS (true/false). - **price** (string) - The price of the service. - **ttl** (integer) - Time To Live for the service information. - **stock** (integer) - The available stock for the service. #### Response Example ```json { "service_name": "Whatsapp", "api_name": "whatsapp", "multiple_sms": "true", "price": "0.55", "ttl": 5, "stock": 66 } ``` ``` -------------------------------- ### Authenticate API Requests Source: https://getatext.com/api-docs/index All API requests must be authenticated using an API key. Include your API key in the request headers as `Auth: YOUR_API_KEY`. The API key can be found on your user profile page. ```http Header: "Auth": "sk_your_very_secret_api_key" ``` -------------------------------- ### Authentication Source: https://getatext.com/api-docs/index All API requests must be authenticated. Include your API key in the request headers as `Auth: YOUR_API_KEY`. ```APIDOC ## Authentication All API requests must be authenticated. Include your API key in the request headers as `Auth: YOUR_API_KEY`. ### Example Header `"Auth": "sk_your_very_secret_api_key"` ``` -------------------------------- ### Mark Rental as Completed (POST /api/v1/rental-status/{id}/completed) Source: https://getatext.com/api-docs/index Marks a specific rental as completed. Requires the rental ID in the URL and an API key for authentication. Returns the updated rental status upon success. ```curl curl -X POST https://getatext.com/api/v1/rental-status/{id}/completed \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ ``` -------------------------------- ### POST /api/v1/auctions/{id}/bid - Place a Bid on Auction Source: https://getatext.com/api-docs/index Allows users to place a bid on a specific active auction. The bid amount must be higher than the current bid, and the user must have sufficient funds. Requires an API key and the auction ID. ```cURL curl -X POST https://getatext.com/api/v1/auctions/1/bid \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "bid_amount": 0.60 }' ``` -------------------------------- ### Mark Rental as Completed Source: https://getatext.com/api-docs/index This endpoint allows you to mark a specific rental as completed by providing its ID. ```APIDOC ## POST /api/v1/rental-status/{id}/completed ### Description Use this endpoint to mark a specific rental as completed. ### Method POST ### Endpoint /api/v1/rental-status/{id}/completed #### Path Parameters - **id** (integer) - Required - The ID of the rental to mark as completed. ### Request Example ```json { "example": "No request body needed for this endpoint." } ``` ### Response #### Success Response (200 OK) - **status** (string) - Indicates the success of the operation. - **message** (string) - A confirmation message. - **errors** (string) - Any errors encountered during the operation (should be null on success). - **rental** (object) - Details of the completed rental. - **id** (integer) - The ID of the rental. - **end_time** (string) - The completion time of the rental. - **number** (string) - The phone number associated with the rental. - **service_name** (string) - The name of the service used for the rental. - **price** (string) - The price of the rental. - **new_balance** (string) - The user's balance after the rental completion. #### Response Example ```json { "status": "success", "message": "Rental marked as completed successfully.", "errors": "null", "rental": { "id": 12345, "end_time": "2025-08-12 00:19:30", "number": "1234567890", "service_name": "Whatsapp", "price": "0.1", "new_balance": "9.9" } } ``` ``` -------------------------------- ### POST /api/v1/rent-multiple-services Source: https://getatext.com/api-docs/index This endpoint allows you to rent multiple services on the same phone number simultaneously. Provide a comma-separated list of service codes. All services must be available on the same number, or the request will fail and be cached. (1 Request per second) ```APIDOC ## POST /api/v1/rent-multiple-services ### Description This endpoint allows you to rent multiple services on the same phone number simultaneously. Provide a comma-separated list of service codes. All services must be available on the same number, or the request will fail and be cached. (1 Request per second) ### Method POST ### Endpoint /api/v1/rent-multiple-services ### Parameters #### Request Body - **services** (string) - Required - A comma-separated list of service codes. - **max_price** (float) - Optional - The maximum price you are willing to pay for the number. - **carrier** (string) - Optional - The preferred carrier for the phone number. - **keep_carrier** (boolean) - Optional - Whether to keep the current carrier if a number is already rented. ### Request Example ```json { "services": "whatsapp,telegram,instagram", "max_price": 3.00 } ``` ### Response #### Success Response (201 CREATED) - **status** (string) - The status of the request. - **rentals** (array) - An array of rental objects, one for each service requested. - **id** (integer) - The unique identifier for the rental. - **status** (string) - The status of the rental. - **message** (string) - A message indicating the result of the rental. - **errors** (object|null) - Contains error details if the rental failed. - **end_time** (string) - The time when the rental will expire. - **number** (string) - The rented phone number. - **service_name** (string) - The name of the service. - **price** (string) - The price of the rental. - **new_balance** (string) - The updated balance after all rentals. - **total_cost** (string) - The total cost for all successful rentals. #### Response Example ```json { "status": "success", "rentals": [ { "id": 12345, "status": "success", "message": "Number rented successfully.", "errors": null, "end_time": "2025-07-06 15:43:37", "number": "1234567890", "service_name": "Whatsapp", "price": "0.55" }, { "id": 12346, "status": "success", "message": "Number rented successfully.", "errors": null, "end_time": "2025-07-06 15:43:37", "number": "1234567890", "service_name": "Telegram", "price": "0.45" }, { "id": 12347, "status": "success", "message": "Number rented successfully.", "errors": null, "end_time": "2025-07-06 15:43:37", "number": "1234567890", "service_name": "Instagram", "price": "0.50" } ], "new_balance": "111.82", "total_cost": "1.50" } ``` #### Important Note If at least one service is unavailable on the same number, the entire request fails and the service combination is cached for 5-15 minutes to prevent repeated failed attempts. ``` -------------------------------- ### POST /api/v1/rental-status Source: https://getatext.com/api-docs/index Use this endpoint to retrieve the status of a specific rental. ```APIDOC ## POST /api/v1/rental-status ### Description Use this endpoint to retrieve the status of a specific rental. ### Method POST ### Endpoint /api/v1/rental-status ### Parameters #### Request Body - **id** (integer) - Required - The ID of the rental to check the status for. ### Request Example ```json { "id": 1234 } ``` ### Response #### Success Response (200 OK) - **id** (integer) - The ID of the rental. - **status** (string) - The current status of the rental (e.g., 'active'). - **code** (null) - This field is null in the status response. - **errors** (object|null) - Contains error details if the status retrieval failed. - **end_time** (string) - The time when the rental will expire. - **number** (string) - The phone number associated with the rental. - **service_name** (string) - The name of the service. - **cost** (string) - The cost of the rental. - **balance** (string) - The current balance. #### Response Example ```json { "id": 12345, "status": "active", "code": null, "errors": null, "end_time": "2025-07-06 15:43:37", "number": "1234567890", "service_name": "Whatsapp", "cost": "0.55", "balance": "113.32" } ``` ``` -------------------------------- ### Retrieve User Balance Source: https://getatext.com/api-docs/index This endpoint allows you to check your current account balance. ```APIDOC ## GET /api/v1/balance ### Description Use this endpoint to retrieve the user's balance. ### Method GET ### Endpoint /api/v1/balance ### Parameters #### Query Parameters This endpoint does not accept any query parameters. ### Request Example ```json { "example": "No request body needed for this endpoint." } ``` ### Response #### Success Response (200 OK) - **status** (string) - Indicates the success of the operation. - **balance** (string) - The current user balance. - **errors** (string) - Any errors encountered during the operation (should be null on success). #### Response Example ```json { "status": "success", "balance": "10.55", "errors": "null" } ``` ``` -------------------------------- ### Webhook Notification Source: https://getatext.com/api-docs/index Configure a webhook to receive codes and related information when your platform receives them. Recommended to use IP whitelisting for security. ```APIDOC ## Webhook Notification ### Description Configure a webhook in your profile to receive codes and associated details when our platform receives them. For security, we recommend using an IP whitelist for your endpoint, as webhook requests are sent from `104.198.170.54`. ### Method POST (to your configured endpoint) ### Request Body Example ```json { "id": 12345, "code": 654321, "received_at": "2025-07-06 15:43:37", "number": "1234567890", "service_name": "Whatsapp", "status": "active", "cost": "0.91" } ``` ### Fields in Webhook Request - **id** (integer) - Unique identifier for the event. - **code** (integer) - The received code. - **received_at** (string) - Timestamp when the code was received. - **number** (string) - The phone number associated with the code. - **service_name** (string) - The name of the service. - **status** (string) - The status of the received item (e.g., 'active'). - **cost** (string) - The cost associated with the service. ``` -------------------------------- ### Create Long Rental (POST /api/v1/long-rentals) Source: https://getatext.com/api-docs/index Creates a new long-term rental. Requires the desired rental time and auto-renew status in the request body, along with an API key. Returns details of the created long rental upon success. ```curl curl -X POST https://getatext.com/api/v1/long-rentals \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "auto_renew": true, "rental_time": "1w" }' ``` -------------------------------- ### POST /api/v1/cancel-rental Source: https://getatext.com/api-docs/index Use this endpoint to cancel a rental. You must wait 1 minute before requesting a cancellation. (1 Request per second) ```APIDOC ## POST /api/v1/cancel-rental ### Description Use this endpoint to cancel a rental. You must wait 1 minute before requesting a cancellation. (1 Request per second) ### Method POST ### Endpoint /api/v1/cancel-rental ### Parameters #### Request Body - **id** (integer) - Required - The ID of the rental to cancel. ### Request Example ```json { "id": 1234 } ``` ### Response #### Success Response (200 OK) - **id** (integer) - The ID of the cancelled rental. - **status** (string) - The status of the rental, which should be 'cancelled'. - **code** (null) - This field is null for cancellation. - **errors** (object|null) - Contains error details if the cancellation failed. - **end_time** (string) - The time when the rental would have expired. - **number** (string) - The phone number associated with the rental. - **service_name** (string) - The name of the service. - **cost** (string) - The cost of the rental. - **balance** (string) - The balance after the cancellation. #### Response Example ```json { "id": 12345, "status": "cancelled", "code": null, "errors": null, "end_time": "2025-07-06 15:43:37", "number": "1234567890", "service_name": "Whatsapp", "cost": "0.55", "balance": "113.87" } ``` ``` -------------------------------- ### POST /api/v1/auctions/{id}/bid Source: https://getatext.com/api-docs/index Allows users to place a bid on a specific active auction. The bid must be higher than the current bid, and the user must have sufficient balance. ```APIDOC ## POST /api/v1/auctions/{id}/bid ### Description Place a bid on an active auction. Your bid must be higher than the current bid, and you must have sufficient balance to cover the total cost (bid amount × quantity). ### Method POST ### Endpoint https://getatext.com/api/v1/auctions/{id}/bid ### Path Parameters - **id** (integer) - Required - The ID of the auction to bid on. ### Headers - **Auth** (string) - Required - Your API key for authentication. - **Content-Type** (string) - Required - `application/json` ### Request Body - **bid_amount** (float) - Required - The amount you wish to bid. ### Request Example ```json { "bid_amount": 0.60 } ``` ### Response #### Success Response (200 OK) - **status** (string) - Indicates the status of the request ('success'). - **message** (string) - A confirmation message that the bid was placed. - **new_current_bid** (string) - The updated highest bid amount for the auction. #### Response Example ```json { "status": "success", "message": "Bid placed successfully.", "new_current_bid": "0.60" } ``` #### Error Responses - **400 Bad Request** - **errors** (string) - "Your bid must be higher than the current bid" - **errors** (string) - "Insufficient funds for this bid" - **404 Not Found** - **errors** (string) - "Auction not found or is no longer active" ``` -------------------------------- ### Rent a Phone Number for a Single Service (cURL) Source: https://getatext.com/api-docs/index This cURL command demonstrates how to request a new phone number for a specific service. It requires the service code and optionally accepts maximum price, carrier, and keep_carrier parameters. The response includes details of the rented number and its status. ```curl curl -X POST https://getatext.com/api/v1/rent-a-number \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "service": "whatsapp", "max_price": 1.00, "carrier": "at&t", "keep_carrier": "true" }' ``` -------------------------------- ### Create Long Rental Source: https://getatext.com/api-docs/index This endpoint allows you to create a new long-term rental for a phone number. ```APIDOC ## POST /api/v1/long-rentals ### Description Use this endpoint to create a new long rental. ### Method POST ### Endpoint /api/v1/long-rentals #### Request Body - **auto_renew** (boolean) - Required - Set to true to enable auto-renewal. - **rental_time** (string) - Required - The duration of the rental. Accepted values: "1w", "2w", "1m", "1y". ### Request Example ```json { "auto_renew": true, "rental_time": "1w" } ``` ### Response #### Success Response (200 OK) - **status** (string) - Indicates the success of the operation. - **long_rental** (object) - Details of the newly created long rental. - **id** (integer) - The ID of the long rental. - **number** (string) - The phone number associated with the rental. - **end_time** (string) - The expiration date of the rental. - **rented_at** (string) - The date the rental was initiated. - **price** (string) - The price of the rental. - **status** (string) - The current status of the rental. - **period** (string) - The duration of the rental period. - **auto_renew** (boolean) - Indicates if the rental is set to auto-renew. - **errors** (string) - Any errors encountered during the operation (should be null on success). #### Response Example ```json { "status": "success", "long_rental": { "id": 1, "number": "1234567890", "end_time": "2025-07-06", "rented_at": "2025-07-01", "price": "10.55", "status": "Active", "period": "1 Week", "auto_renew": true }, "errors": "null" } ``` ``` -------------------------------- ### Rent Multiple Services on One Number (cURL) Source: https://getatext.com/api-docs/index This cURL command shows how to rent multiple services simultaneously on the same phone number. Provide a comma-separated list of service codes. The request will fail if all services are not available on the same number. The response details each rental and the new balance. ```curl curl -X POST https://getatext.com/api/v1/rent-multiple-services \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "services": "whatsapp,telegram,instagram", "max_price": 3.00 }' ``` -------------------------------- ### POST /api/v1/rent-a-number Source: https://getatext.com/api-docs/index This endpoint allows you to request a new phone number for a specific service. You need to provide the service code you want to verify. The code can be viewed on the "Services" in our platform. (1 Request per second) ```APIDOC ## POST /api/v1/rent-a-number ### Description This endpoint allows you to request a new phone number for a specific service. You need to provide the service code you want to verify. The code can be viewed on the "Services" in our platform. (1 Request per second) ### Method POST ### Endpoint /api/v1/rent-a-number ### Parameters #### Request Body - **service** (string) - Required - The service code for which to rent a number. - **max_price** (float) - Optional - The maximum price you are willing to pay for the number. - **carrier** (string) - Optional - The preferred carrier for the phone number. - **keep_carrier** (boolean) - Optional - Whether to keep the current carrier if a number is already rented. ### Request Example ```json { "service": "whatsapp", "max_price": 1.00, "carrier": "at&t", "keep_carrier": true } ``` ### Response #### Success Response (201 CREATED) - **id** (integer) - The unique identifier for the rental. - **status** (string) - The status of the rental request. - **message** (string) - A message indicating the result of the request. - **errors** (object|null) - Contains error details if the request failed. - **end_time** (string) - The time when the rental will expire. - **number** (string) - The rented phone number. - **service_name** (string) - The name of the service. - **price** (string) - The price of the rental. - **new_balance** (string) - The updated balance after the rental. #### Response Example ```json { "id": 12345, "status": "success", "message": "Number rented successfully.", "errors": null, "end_time": "2025-07-06 15:43:37", "number": "1234567890", "service_name": "Whatsapp", "price": "0.55", "new_balance": "113.32" } ``` #### Error Handling - If the request fails, the `errors` field will contain detailed issue information. Common status codes include 400, 403, and 401. ``` -------------------------------- ### Re-rent a Number Source: https://getatext.com/api-docs/index This endpoint allows you to re-rent a number, likely for continued use. ```APIDOC ## POST /api/v1/re-rent ### Description Use this endpoint to re-rent a number. ### Method POST ### Endpoint /api/v1/re-rent #### Request Body - **rental_id** (integer) - Required - The ID of the rental to re-rent. ### Request Example ```json { "rental_id": 1234 } ``` ### Response #### Success Response (201 OK) - **id** (integer) - The ID of the newly rented number. - **status** (string) - Indicates the success of the operation. - **message** (string) - A confirmation message. - **errors** (string) - Any errors encountered during the operation (should be null on success). - **end_time** (string) - The expiration time of the new rental. - **number** (string) - The phone number that was re-rented. - **service_name** (string) - The name of the service used. - **price** (string) - The price of the re-rental. - **new_balance** (string) - The user's balance after the re-rental. #### Response Example ```json { "id": 12345, "status": "success", "message": "Number rented successfully.", "errors": null, "end_time": "2025-07-06 15:43:37", "number": "1234567890", "service_name": "Whatsapp", "price": "0.55", "new_balance": "113.32" } ``` ``` -------------------------------- ### Re-rent a Number (POST /api/v1/re-rent) Source: https://getatext.com/api-docs/index Re-rents a number for a specified rental ID. Requires the rental ID in the request body and an API key for authentication. Returns details of the newly rented number upon success. ```curl curl -X POST https://getatext.com/api/v1/re-rent \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "rental_id": 1234 }' ``` -------------------------------- ### Retrieve Rental Status (cURL) Source: https://getatext.com/api-docs/index This cURL command demonstrates how to check the status of a specific phone number rental. It requires the rental ID, and the response provides the current status, code, end time, number, service name, cost, and balance. ```curl curl -X POST https://getatext.com/api/v1/rental-status \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": 1234 }' ``` -------------------------------- ### Retrieve Messages for Long Rental Source: https://getatext.com/api-docs/index This endpoint retrieves all messages associated with a specific long-term rental. ```APIDOC ## GET /api/v1/long-rentals/{id}/messages ### Description Use this endpoint to retrieve messages for a specific long rental. ### Method GET ### Endpoint /api/v1/long-rentals/{id}/messages #### Path Parameters - **id** (integer) - Required - The ID of the long rental for which to retrieve messages. ### Request Example ```json { "example": "No request body needed for this endpoint." } ``` ### Response #### Success Response (200 OK) - **status** (string) - Indicates the success of the operation. - **messages** (array) - A list of message objects. - **message** (string) - The content of the message. - **number** (string) - The phone number associated with the message. - **rented_at** (string) - The timestamp when the message was sent or received. - **sender** (string) - The sender of the message. - **errors** (string) - Any errors encountered during the operation (should be null on success). #### Response Example ```json { "status": "success", "messages": [ { "message": "This is a example message", "number": "1234567890", "rented_at": "2025-07-28T12:39:32-04:00", "sender": "8888" }, .... ], "errors": "null" } ``` ``` -------------------------------- ### Retrieve Long Rentals Source: https://getatext.com/api-docs/index This endpoint retrieves a list of all active long-term rentals associated with the user's account. ```APIDOC ## GET /api/v1/long-rentals ### Description Use this endpoint to retrieve the user's long rentals. ### Method GET ### Endpoint /api/v1/long-rentals ### Parameters #### Query Parameters This endpoint does not accept any query parameters. ### Request Example ```json { "example": "No request body needed for this endpoint." } ``` ### Response #### Success Response (200 OK) - **status** (string) - Indicates the success of the operation. - **long_rentals** (array) - A list of long rental objects. - **id** (integer) - The ID of the long rental. - **number** (string) - The phone number associated with the rental. - **end_time** (string) - The expiration date of the rental. - **rented_at** (string) - The date the rental was initiated. - **price** (string) - The price of the rental. - **status** (string) - The current status of the rental (e.g., "Active"). - **period** (string) - The duration of the rental period (e.g., "1 Week"). - **auto_renew** (boolean) - Indicates if the rental is set to auto-renew. - **errors** (string) - Any errors encountered during the operation (should be null on success). #### Response Example ```json { "status": "success", "long_rentals": [ { "id": 1, "number": "1234567890", "end_time": "2025-07-06", "rented_at": "2025-07-01", "price": "10.55", "status": "Active", "period": "1 Week", "auto_renew": true }, .... ], "errors": "null" } ``` ``` -------------------------------- ### Webhook - Receive SMS Codes Source: https://getatext.com/api-docs/index Configurable webhook to receive SMS codes in real-time when a message is received by the platform. It's recommended to use IP whitelisting for security, as requests originate from a specific IP address. ```JSON { "id": 12345, "code": 654321, "received_at": "2025-07-06 15:43:37" "number": "1234567890" "service_name": "Whatsapp" "status": "active" "cost": "0.91" } ``` -------------------------------- ### Update Long Rental (POST /api/v1/long-rentals/{id}/update) Source: https://getatext.com/api-docs/index Updates an existing long-term rental. Requires the rental ID in the URL and an action (e.g., 'renew', 'cancel') in the request body, along with an API key. Optionally accepts 'auto_renew' status for the 'auto_renew' action. Returns details of the updated long rental upon success. ```curl curl -X POST https://getatext.com/api/v1/long-rentals/{id}/update \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "renew", "auto_renew": true }' ``` -------------------------------- ### Update Long Rental Source: https://getatext.com/api-docs/index This endpoint allows you to update an existing long-term rental, such as renewing it or changing auto-renewal settings. ```APIDOC ## POST /api/v1/long-rentals/{id}/update ### Description Use this endpoint to update an existing long rental. ### Method POST ### Endpoint /api/v1/long-rentals/{id}/update #### Path Parameters - **id** (integer) - Required - The ID of the long rental to update. #### Request Body - **action** (string) - Required - The action to perform. Accepted values: "renew", "cancel", "auto_renew". - **auto_renew** (boolean) - Optional - Required only if the action is "auto_renew". Set to true to enable auto-renewal. ### Request Example ```json { "action": "renew", "auto_renew": true } ``` ### Response #### Success Response (200 OK) - **status** (string) - Indicates the success of the operation. - **long_rental** (object) - Details of the updated long rental. - **id** (integer) - The ID of the long rental. - **number** (string) - The phone number associated with the rental. - **end_time** (string) - The expiration date of the rental. - **rented_at** (string) - The date the rental was initiated. - **price** (string) - The price of the rental. - **status** (string) - The current status of the rental. - **period** (string) - The duration of the rental period. - **auto_renew** (boolean) - Indicates if the rental is set to auto-renew. - **errors** (string) - Any errors encountered during the operation (should be null on success). #### Response Example ```json { "status": "success", "long_rental": { "id": 1, "number": "1234567890", "end_time": "2025-07-06", "rented_at": "2025-07-01", "price": "10.55", "status": "Active", "period": "1 Week", "auto_renew": true }, "errors": "null" } ``` ``` -------------------------------- ### Cancel a Phone Number Rental (cURL) Source: https://getatext.com/api-docs/index This cURL command illustrates how to cancel an active phone number rental. You must wait at least 1 minute before requesting a cancellation. The request requires the rental ID, and the response confirms the cancellation status. ```curl curl -X POST https://getatext.com/api/v1/cancel-rental \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": 1234 }' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.