API Docs

Welcome to the Getatext API. Here you'll find all the information you need to integrate our services into your applications. Automate SMS verifications with ease.

Authentication

All API requests must be authenticated. Include your API key in the request headers as `Auth: YOUR_API_KEY`. You can find your API key in your user profile page.

Example Header

"Auth": "sk_your_very_secret_api_key"

POST /api/v1/rent-a-number

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. (2 Request per second)

Request Body Parameters

{ "service": "whatsapp", // REQUIRED: Service API name "max_price": 1.00, // OPTIONAL: Maximum price willing to pay "carrier": "at&t", // OPTIONAL: Preferred carrier "keep_carrier": true, // OPTIONAL: Force carrier match (boolean) "lock_area_code": true, // OPTIONAL: Strict area code matching (boolean) "area_codes": "123,456,789" // OPTIONAL: Comma-separated area codes }

Pricing Notes

// Base price multipliers: // - Carrier match only: +20% (price × 1.2) // - Area code match only: +20% (price × 1.2) // - Both carrier and area code match: +40% (price × 1.4)

Example cURL Request

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, "area_codes": "212,646" }'

Successful Response (201 CREATED)

{ "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 Responses

// 503 Service Unavailable - Maintenance Mode { "errors": "Service is under maintenance" } // 403 Forbidden - Missing Authentication { "errors": "Auth is not presented on the request" } // 403 Forbidden - Invalid API Key or User Restricted { "errors": "Wrong Api Key or User is restricted" } // 400 Bad Request - Missing Service Parameter { "errors": "Service is not presented on the request" } // 400 Bad Request - Wrong Carrier { "errors": "Wrong Carrier" } // 404 Not Found - Service Not Found { "errors": "Service not found" } // 400 Bad Request - User Rental Limit Reached { "errors": "You have reached the maximum number of active rentals" } // 400 Bad Request - Out of Stock (General) { "errors": "Service is out of stock" } // 400 Bad Request - Out of Stock (Specific Carrier) { "errors": "Service is out of stock for selected carrier: at&t" } // 400 Bad Request - Out of Stock (Carrier + Area Codes) { "errors": "Service is out of stock for selected carrier and area codes" } // 400 Bad Request - Out of Stock (Area Codes) { "errors": "Service is out of stock for selected area codes" } // 400 Bad Request - Service Not Available for User { "errors": "Service is not available" } // 400 Bad Request - Insufficient Funds (Base Price) { "errors": "Insufficient funds" } // 400 Bad Request - Insufficient Funds (With Extra Charges) { "errors": "Insufficient funds for area code extra charge" } // 400 Bad Request - Price Exceeds Maximum { "errors": "The price of the service exceeds the maximum price you are willing to pay, actual price is: 1.25" } // 408 Request Timeout - Number Already Taken { "errors": "Rental error, number is already taken. Please try again" } // 429 Too Many Requests { "errors": "Rental error, number is already taken. Please try again" }

Important Notes

// 1. Rate limit: 2 request per second // 4. Area codes must be comma-separated without spaces // 5. Keep_carrier forces strict carrier matching (may fail if unavailable) // 6. Lock_area_code forces strict area code matching (may fail if unavailable) // 7. Price increases apply: carrier OR area code = +20%, both = +40%

POST /api/v1/rent-specific-number

This endpoint allows you to rent a specific phone number (that you choose) for a specific service, instead of letting the system pick a random number. A flat +20% surcharge applies to the base price. If you have previously rented this exact number for the same service and the rental was completed, a returning-customer discount is applied (half of your original cost for that number × 1.20 surcharge). Shares the same throttle group as /api/v1/rent-a-number.

Request Body Parameters

{ "number": "1234567890", // REQUIRED: Exact phone number you want to rent "service": "whatsapp", // REQUIRED: Service API name "max_price": 1.50 // OPTIONAL: Maximum final price (including +20% surcharge) willing to pay }

Pricing Notes

// Price calculation: // - New rental: base service price × 1.20 (flat +20% specific-number surcharge) // - Returning customer (previously completed rental for same number + service): // (original_cost / 2) × 1.20 // - max_price is compared against the FINAL cost (after the +20% surcharge) // - Carrier / area code multipliers do NOT apply here; you chose the number yourself

Example cURL Request

curl -X POST https://getatext.com/api/v1/rent-specific-number \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "number": "1234567890", "service": "whatsapp", "max_price": 1.50 }'

Successful Response (201 CREATED)

{ "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.66, "new_balance": 113.32, "country": "usa", "returning_customer": false }

Error Responses

// 503 Service Unavailable - Maintenance Mode { "errors": "Service is under maintenance" } // 403 Forbidden - Missing Authentication { "errors": "Auth is not presented on the request" } // 403 Forbidden - Invalid API Key or User Restricted { "errors": "Wrong Api Key or User is restricted" } // 400 Bad Request - Missing number or service { "errors": "Phone number and service are required" } // 400 Bad Request - Global Rental Limit Reached { "errors": "The maximum number of active rentals as reached" } // 404 Not Found - Service Not Found { "errors": "Service not found" } // 400 Bad Request - Service Requires Prior Approval { "errors": "This service requires prior approval. Please request access through the platform portal before renting." } // 400 Bad Request - User Rental Limit Reached { "errors": "You have reached the maximum number of active rentals" } // 404 Not Found - Number Not Available { "errors": "This number does not exist in our system or is not available" } // 400 Bad Request - Number Already Used/Taken For This Service { "errors": "This number is unavailable for you. Please try a different number" } // 400 Bad Request - Invalid Price { "errors": "Invalid price for this service" } // 400 Bad Request - Price Exceeds Maximum { "errors": "The price of the service exceeds the maximum price you are willing to pay, actual price is: 1.25" } // 400 Bad Request - Insufficient Funds { "errors": "Insufficient funds" }

Important Notes

// 1. Shares the rentNumber throttle group with /api/v1/rent-a-number // 2. You must pass the exact phone number (no formatting, digits only as stored in our system) // 3. A flat +20% surcharge ALWAYS applies on top of the base service price // 4. Returning customers (same number + service previously completed) get a 50% base discount before the +20% surcharge // 5. The number must be in our active pool and not already in use for that service by another user // 6. Carrier / area_code / keep_carrier / lock_area_code parameters are NOT supported here — use /api/v1/rent-a-number for filtered random selection

POST /api/v1/rent-multiple-services

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)

Request Body

{ "services": "whatsapp,telegram,instagram", // REQUIRED: Comma-separated service API names "max_price": 3.00, // OPTIONAL: Maximum total price willing to pay "carrier": "at&t", // OPTIONAL: Preferred carrier "keep_carrier": true, // OPTIONAL: Force carrier match (boolean) "rent_area_codes": "212,646", // OPTIONAL: Comma-separated area codes. Overrides the dashboard-configured area codes. "lock_area_code": true // OPTIONAL: Fail if no number is available in the requested area codes. Overrides the dashboard setting. }

Example cURL Request

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, "rent_area_codes": "212,646", "lock_area_code": true }'

Successful Response (201 CREATED)

{ "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: 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/cancel-rental

Use this endpoint to cancell a rental. You must wait 1 min before request a cancellation. (1 Request per second)

Request Body

{ "id": 1234 }

Example cURL Request

curl -X POST https://getatext.com/api/v1/cancel-rental \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": 1234 }'

Successful Response (200 OK)

{ "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/rental-status

Use this endpoint to retrieve the status of a specific rental.

Request Body

{ "id": 1234 }

Example cURL Request

curl -X POST https://getatext.com/api/v1/rental-status \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": 1234 }'

Successful Response (200 OK)

{ "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" }

POST /api/v1/rental-status/{id}/completed

Use this endpoint to mark a specific rental as completed.

Example cURL Request

curl -X POST https://getatext.com/api/v1/rental-status/{id}/completed \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \

Successful Response (200 OK)

{ "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" } }

GET /api/v1/prices-info

Use this endpoint to retrieve the available services in the platform.

Example cURL Request

curl -X GET https://getatext.com/api/v1/prices-info \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \'

Successful Response (200 OK)

{ "service_name": "Whatsapp", "api_name": "whatsapp", "multiple_sms": "true", "price": "0.55", "ttl": 5, "stock": 66, }

POST /api/v1/re-rent

Use this endpoint to retrieve the available services in the platform.

Request Body

{ "rental_id": 1234 }

Example cURL Request

curl -X POST https://getatext.com/api/v1/re-rent \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "rental_id": 1234 }'

Successful Response (201 OK)

{ "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" }

GET /api/v1/balance

Use this endpoint to retrieve the user's balance.

Example cURL Request

curl -X GET https://getatext.com/api/v1/balance \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \'

Successful Response (200 OK)

{ "status": "success", "balance": "10.55", "errors": "null", }

GET /api/v1/long-rentals/prices

Retrieve the available long rental pricing and current stock. Prices are fixed; stock is the number of pool numbers currently available for a new long rental.

Example cURL Request

curl -X GET https://getatext.com/api/v1/long-rentals/prices \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json"

Successful Response (200 OK)

{ "status": "success", "prices": { "1w": 10.99, "2w": 12.99, "1m": 14.99 }, "stock": 42, "errors": null }

GET /api/v1/long-rentals

Use this endpoint to retrieve the user's long rentals.

Example cURL Request

curl -X GET https://getatext.com/api/v1/long-rentals \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \'

Successful Response (200 OK)

{ "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", }

POST /api/v1/long-rentals

Use this endpoint to create a new long rental. Optionally include area_codes to restrict the assigned number to a specific set of US area codes (comma-separated string or array). When provided in the request, it takes priority over the account's default area codes configured in the user settings. If omitted, the account default will be used (if any). Selecting by area code adds a 20% surcharge to the rental price.

Request Body

{ "auto_renew": true, "rental_time": "1w", "area_codes": "305,786,407" }

Example cURL Request

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", // Can be "1w", "2w", "1m", "1y" "area_codes": "305,786,407" // Optional. Comma-separated string or array of area codes. Overrides the account default. }'

Successful Response (200 OK)

{ "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", }

POST /api/v1/long-rentals/{id}/update

Use this endpoint to update an existing long rental.

Request Body

{ "action": "renew", "auto_renew": true }

Example cURL Request

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", // or "cancel", "auto_renew" "auto_renew": true, // Optional, only for "auto_renew" action }'

Successful Response (200 OK)

{ "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", }

GET /api/v1/long-rentals/{id}/messages

Use this endpoint to retrieve messages for a specific long rental.

Example cURL Request

curl -X GET https://getatext.com/api/v1/long-rentals/{id}/messages \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \

Successful Response (200 OK)

{ "status": "success", "messages": [ { "message": "This is a example message", "number": "1234567890", "rented_at": "2025-07-28T12:39:32-04:00", "sender": "8888", }, .... ], "errors": "null", }

GET /api/v1/service-long-rentals/prices

Retrieve the available pricing for service long rentals. Prices are grouped by service and list every period (1d, 3d, 7d, 14d, 30d) configured for that service.

Example cURL Request

curl -X GET https://getatext.com/api/v1/service-long-rentals/prices \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json"

Successful Response (200 OK)

{ "status": "success", "service_long_rental_prices": [ { "service_name": "Whatsapp", "api_name": "whatsapp", "prices": [ { "period": "1d", "cost": "1.50" }, { "period": "3d", "cost": "3.00" }, { "period": "7d", "cost": "5.00" }, { "period": "14d", "cost": "9.00" }, { "period": "30d", "cost": "15.00" } ] } ], "errors": null }

GET /api/v1/service-long-rentals

Retrieve all of your active service long rentals. Service long rentals reserve a number for a specific service for an extended period (1d, 3d, 7d, 14d, or 30d).

Example cURL Request

curl -X GET https://getatext.com/api/v1/service-long-rentals \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json"

Successful Response (200 OK)

{ "status": "success", "service_long_rentals": [ { "id": 1, "number": "1234567890", "service_name": "Whatsapp", "api_name": "whatsapp", "end_time": "2026-04-26", "rented_at": "2026-04-19", "cost": "5.00", "status": "Active", "period": "7 Days", "auto_renew": true } ], "errors": null }

POST /api/v1/service-long-rentals

Rent a number for a specific service over a long period. The cost is determined by the platform's service long rental price configuration. Balance is validated before assigning a number.

Request Body Parameters

{ "service": "whatsapp", // REQUIRED: Service api_name "period": "7d", // REQUIRED: 1d, 3d, 7d, 14d or 30d "auto_renew": true, // OPTIONAL: enable auto renewal "area_codes": "212,646", // OPTIONAL: Comma-separated area codes. Overrides the dashboard-configured area codes. "lock_area_code": true // OPTIONAL: Fail if no number is available in the requested area codes. Overrides the dashboard setting. }

Example cURL Request

curl -X POST https://getatext.com/api/v1/service-long-rentals \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "service": "whatsapp", "period": "7d", "auto_renew": true, "area_codes": "212,646", "lock_area_code": true }'

Successful Response (201 CREATED)

{ "status": "success", "message": "Service long rental created successfully.", "service_long_rental": { "id": 1, "number": "1234567890", "service_name": "Whatsapp", "api_name": "whatsapp", "end_time": "2026-04-26", "rented_at": "2026-04-19", "cost": "5.00", "status": "Active", "period": "7 Days", "auto_renew": true }, "errors": null }

Error Responses

// 403 - Service long rentals disabled for the account { "errors": "Service long rentals are not enabled for this account" } // 400 - Missing service / period { "errors": "Service is not presented on the request" } { "errors": "Period is not presented on the request" } // 422 - Invalid period { "errors": "Invalid period. Allowed values: 1d, 3d, 7d, 14d, 30d" } // 404 - Service not found { "errors": "Service not found" } // 422 - Service not configured for the requested period { "errors": "This service is not available for long rental in the selected period" } // 400 - Insufficient funds { "errors": "Insufficient funds" } // 422 - No pool number available { "errors": "No available pool number for service long rental" }

POST /api/v1/service-long-rentals/{number}/cancel

Cancel a service long rental using the assigned phone number. Cancellation is only allowed if the rental has not yet received any messages and is still inside the cancellation window. If the same number is rented for multiple services, include the service parameter to disambiguate.

Optional Body Parameter

{ "service": "whatsapp" // OPTIONAL: only required if multiple services exist on the same number }

Example cURL Request

curl -X POST https://getatext.com/api/v1/service-long-rentals/1234567890/cancel \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "service": "whatsapp" }'

Successful Response (200 OK)

{ "status": "success", "message": "Service long rental cancelled successfully.", "service_long_rental": { "id": 1, "number": "1234567890", "service_name": "Whatsapp", "api_name": "whatsapp", "end_time": "2026-04-26", "rented_at": "2026-04-19", "cost": "5.00", "status": "Cancelled", "period": "7 Days", "auto_renew": true }, "errors": null }

Error Responses

// 404 - No active rental found { "errors": "Service long rental not found" } // 400 - Multiple rentals on the same number { "errors": "Multiple active service long rentals found for this number. Provide the \"service\" parameter to disambiguate." } // 422 - Cannot cancel (already received messages or window expired) { "errors": "Service long rental cannot be cancelled (already received messages or cancellation window expired)" }

POST /api/v1/service-long-rentals/{number}/auto-renew

Enable or disable auto-renewal for an active service long rental, identified by the assigned phone number. When auto-renewal is enabled, the rental will be automatically renewed at expiration as long as the account has sufficient balance. If the same number is rented for multiple services, include the service parameter to disambiguate.

Body Parameters

{ "auto_renew": true, // REQUIRED: true to enable, false to disable "service": "whatsapp" // OPTIONAL: only required if multiple services exist on the same number }

Example cURL Request

curl -X POST https://getatext.com/api/v1/service-long-rentals/1234567890/auto-renew \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "auto_renew": true, "service": "whatsapp" }'

Successful Response (200 OK)

{ "status": "success", "message": "Service long rental auto-renew updated successfully.", "service_long_rental": { "id": 1, "number": "1234567890", "service_name": "Whatsapp", "api_name": "whatsapp", "end_time": "2026-04-26", "rented_at": "2026-04-19", "cost": "5.00", "status": "Active", "period": "7 Days", "auto_renew": true }, "errors": null }

Error Responses

// 400 - Missing auto_renew parameter { "errors": "auto_renew is not presented on the request" } // 422 - auto_renew is not a valid boolean { "errors": "auto_renew must be a boolean" } // 404 - No active rental found { "errors": "Service long rental not found" } // 400 - Multiple rentals on the same number { "errors": "Multiple active service long rentals found for this number. Provide the \"service\" parameter to disambiguate." }

POST /api/v1/service-long-rentals/{number}/renew

Manually renew an active service long rental, identified by the assigned phone number. The rental's end date is extended by its original duration and the same cost is charged again to the account balance. If the same number is rented for multiple services, include the service parameter to disambiguate.

Optional Body Parameter

{ "service": "whatsapp" // OPTIONAL: only required if multiple services exist on the same number }

Example cURL Request

curl -X POST https://getatext.com/api/v1/service-long-rentals/1234567890/renew \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "service": "whatsapp" }'

Successful Response (200 OK)

{ "status": "success", "message": "Service long rental renewed successfully.", "service_long_rental": { "id": 1, "number": "1234567890", "service_name": "Whatsapp", "api_name": "whatsapp", "end_time": "2026-05-03", "rented_at": "2026-04-19", "cost": "5.00", "status": "Active", "period": "7 Days", "auto_renew": true }, "errors": null }

Error Responses

// 404 - No active rental found { "errors": "Service long rental not found" } // 400 - Multiple rentals on the same number { "errors": "Multiple active service long rentals found for this number. Provide the \"service\" parameter to disambiguate." } // 400 - Insufficient balance to renew { "errors": "Insufficient funds" }

GET /api/v1/service-long-rentals/{number}/messages

Retrieve all messages received for a service long rental, identified by the assigned phone number. If the same number is rented for multiple services, include the service query parameter.

Example cURL Request

curl -X GET "https://getatext.com/api/v1/service-long-rentals/1234567890/messages?service=whatsapp" \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json"

Successful Response (200 OK)

{ "status": "success", "messages": [ { "message": "Your Whatsapp code is 123456", "sender": "8888", "received_at": "2026-04-19T12:39:32-04:00", "number": "1234567890", "service_name": "Whatsapp" } ], "errors": null }

Error Responses

// 404 - No active rental found { "errors": "Service long rental not found" } // 400 - Multiple rentals on the same number { "errors": "Multiple active service long rentals found for this number. Provide the \"service\" parameter to disambiguate." }

GET /stubs/handler_api.php

Legacy GET-based API compatible with third-party integrations. All parameters are passed as query string values. Authenticate using api_key and select the operation with action.

Base Request

curl -X GET "https://getatext.com/stubs/handler_api.php?api_key=YOUR_API_KEY&action=ACTION&..." \ -H "Content-Type: application/json"

action=getNumber — Rent a number

// Required service=whatsapp // Optional filters carrier=at%26t // "at&t" or "tmobile" keep_carrier=true // Fail if carrier unavailable area_codes=212,646 // Comma-separated area codes lock_area_code=true // Fail if no number in given area codes max_price=1.00 // Skip if real price exceeds this // Price multipliers (same as /api/v1/rent-a-number): // Carrier match only OR area code only: ×1.2 // Both carrier and area code match: ×1.4 // Response ACCESS_NUMBER:12345:11234567890 // id:1{number} OUT_OF_STOCK INSUFFICIENT_FUNDS MAX_RENTALS_EXCEEDED BAD_SERVICE SERVICE_NOT_AVAILABLE APPROVAL_REQUIRED MAX_PRICE_EXCEEDED RENTAL_ERROR RENTAL_ERROR_TRY_AGAIN MAINTENANCE

action=getStatus — Poll for received SMS code

// Required id=12345 // Response STATUS_OK:654321 // Code received STATUS_WAIT_CODE // Still waiting NO_ACTIVATION BAD_ID

action=setStatus — Cancel (8) or mark completed (6)

// Required id=12345 status=8 // 8 = cancel rental status=6 // 6 = mark rental as completed (rental must be in "viewed" status) // Response for status=8 ACCESS_CANCEL RENTAL_LOCKED // Must wait 1 minute after creation NO_ACTIVATION // Response for status=6 ACCESS_ACTIVATION NO_ACTIVATION

action=getBalance — Retrieve account balance

// No extra parameters needed // Response ACCESS_BALANCE:100.50 BAD_KEY MAINTENANCE

action=getExtraActivation — Re-rent the same number from a previous rental

// Required id=12345 // ID of the original (non-active) rental // Cost: original cost, or 50% if user has a prior completed rental for that number+service // Response ACCESS_NUMBER:12346:11234567890 // new_id:1{number} OUT_OF_STOCK INSUFFICIENT_FUNDS RENTAL_ACTIVE // Original rental is still active NO_ACTIVATION BAD_SERVICE // "Not Listed - Generic" services cannot be re-rented MAINTENANCE

action=getPrices — Query price and stock for one or more services

// Required service=whatsapp,telegram // Comma-separated api_names country=187 // Must always be 187 // Response (JSON array) [ { "whatsapp": { "cost": 0.55, "count": 1200, "physicalCount": 1200 } }, { "telegram": { "cost": 0.45, "count": 980, "physicalCount": 980 } } ] BAD_COUNTRY // country != 187 BAD_SERVICE // service param missing MAINTENANCE

GET /api/v1/auctions

Retrieve all active auctions currently available for bidding.

Example cURL Request

curl -X GET https://getatext.com/api/v1/auctions \ -H "Auth: YOUR_API_KEY" \ -H "Content-Type: application/json"

Successful Response (200 OK)

{ "status": "success", "auctions": [ { "id": 1, "service_name": "Whatsapp", "current_bid": "0.55", "end_time": "2026-02-02 18:30:00", "amount": 100 } ] }

POST /api/v1/auctions/{id}/bid

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).

Request Body

{ "bid_amount": 0.60 }

Example cURL Request

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 }'

Successful Response (200 OK)

{ "status": "success", "message": "Bid placed successfully.", "new_current_bid": "0.60" }

Error Responses:

// Bid too low (400) { "errors": "Your bid must be higher than the current bid" } // Insufficient balance (400) { "errors": "Insufficient funds for this bid" } // Auction not found (404) { "errors": "Auction not found or is no longer active" }

POST Webhook

Also, you can configure a webhook in your profile, so we can send codes when our platform receives it. Note: we send webhooks from many different IP addresses, so it's recommended to use a dynamic IP whitelist or other security measures.

Webhook Request to Your Endpoint:

{ "id": 12345, "code": 654321, "received_at": "2025-07-06 15:43:37" "number": "1234567890" "service_name": "Whatsapp" "status": "active" "cost": "0.91" }