Get SMS IN Price File#

Returns the SMS IN price file of the plan assigned to the account in the SMS IN domain, or only its headers.

GET downloads the prices of the plan as a gzipped CSV file named sms_in_prices.csv.gz. HEAD returns the headers of the file without its body, so you can check whether your copy is current before you download it.

File Format#

The file is a CSV file (UTF-8, LF line endings, a header row) compressed with gzip. Each row is one price of the plan. Prices are in USD, VAT excluded. They are printed as the lookup returns them: never rounded, with trailing zeros dropped and at least one decimal kept (0.0, 1.5, 0.0525).

Column

Description

Source prefix

Prefix of the sending number. Empty when the price applies to an SMS from any number. Same as source_prefix in the SMS IN Price Object.

Source number length min

Shortest sending number, in digits. Same as source_number_length_min.

Source number length max

Longest sending number, in digits. Same as source_number_length_max.

Destination prefix

Prefix of the receiving number. Empty when the price applies to any destination. Same as destination_prefix.

Destination number length min

Shortest receiving number, in digits. Same as destination_number_length_min.

Destination number length max

Longest receiving number, in digits. Same as destination_number_length_max.

Country

Country of the receiving number, by name. Same as country.

Price

Price per SMS. Same as price.

Example of the file content:

Source prefix,Source number length min,Source number length max,Destination prefix,Destination number length min,Destination number length max,Country,Price
,1,15,1,11,11,United States,0.005
1,11,11,1,11,11,United States,0.0
,1,15,447,12,12,United Kingdom,0.003

Request#

Host: api-sms.didww.com (Sandbox: api-sms-sandbox.didww.com)

HTTP Method: GET or HEAD

URI Path: /v3/sms_in/prices.csv.gz

The access token must list api-sms.didww.com in its aud. The read scope is enough.

Request Headers#

Name

Type

Is Required?

Description

If-Modified-Since

string

No

The Last-Modified date of the copy you hold. The file (or, for HEAD, its headers) is sent only if it changed after that date. Otherwise the response is 304 Not Modified. Ignored when the request also carries If-None-Match.

Response Headers#

Name

Description

Content-Disposition

attachment with the file name of the domain, sms_in_prices.csv.gz.

Last-Modified

HTTP date of the later of the last change of the file content and the last change of the account’s plan assignment in this domain. Send it back in If-Modified-Since.

Cache-Control

Always private.

Accept-Ranges

Always none. The file is served whole, without byte ranges.

Vary

Always Authorization. One URL returns each account the file of its own plan.

Content-Length

Size of the gzipped file in bytes. Not sent with 304 Not Modified.

No ETag is sent. A request that carries If-None-Match is always answered in full.

Examples#

http

1GET /v3/sms_in/prices.csv.gz HTTP/1.1
2Host: api-sms.didww.com
3Authorization: Bearer [access token]

curl

1curl -i -X GET https://api-sms.didww.com/v3/sms_in/prices.csv.gz -H "Authorization: Bearer [access token]"

response

1HTTP/1.1 200 OK
2Content-Type: application/gzip
3Content-Disposition: attachment; filename="sms_in_prices.csv.gz"
4Last-Modified: Wed, 14 Oct 2026 06:00:00 GMT
5Cache-Control: private
6Accept-Ranges: none
7Vary: Authorization
8Content-Length: 8342

To save the file with curl, use -o with a file name in place of -i:

curl -o sms_in_prices.csv.gz https://api-sms.didww.com/v3/sms_in/prices.csv.gz -H "Authorization: Bearer [access token]"

Other Responses#

Error responses to GET are JSON:API error documents. Responses to HEAD carry no body.

Code

Success

Description

304

Yes

The file has not changed since the If-Modified-Since date. The response carries the headers of the 200 response except Content-Length, and no body.

401

No

Unauthorized. The bearer token was refused. The response carries WWW-Authenticate: Bearer error="invalid_token".

403

No

The token does not carry the read scope (title Insufficient scope). The response carries WWW-Authenticate: Bearer error="insufficient_scope".

404

No

The account holds no price plan of the service in this domain, either no plan at all or a plan for which the service publishes no prices (price_plan_not_assigned).

429

No

The request budget of the account on this service for the current window is spent (too_many_requests). Retry-After gives the number of seconds to wait.

503

No

The file could not be served, for example because the assigned plan has no generated file yet (serving_failure). Retry-After gives the number of seconds to wait.