メインコンテンツへスキップ
PATCH
curl
DiditのPhone APIでは、1回のリクエストで複数の国について、チャネル、ルート、目的を変更できます。sms、voice、whatsapp、silentのスイッチは、その国のすべての配信に適用されます。 Diditは、最初の送信と、フォールバックの各ホップで、closed_channelsの各エントリーを確認します。signals.device_platformが一覧のプラットフォーム(web、ios、android)のいずれかと一致すると、そのエントリーはチャネルをブロックします。ipadosとtvosは、どちらもiosと一致します。 platformsを省略するか[]を渡すと、すべての送信でそのチャネルがブロックされます。3つのプラットフォームすべてを指定した場合も、signals.device_platformを省略した送信を含め、すべての送信でそのチャネルがブロックされます。1つまたは2つのプラットフォームを指定した場合は、送信がそのいずれかに一致したときにのみ適用されます。その国のチャネルブロックを解除するには、空のclosed_channelsリストを送信します。 レスポンスに含まれるのはupdatedだけで、リクエストに含まれる国のエントリー数を示します。これには、保存済みの内容と一致したエントリーも含まれます。電話番号の設定は、国ごとのチャネルやルートではなく、アプリケーション全体のデフォルト設定を返します。不明な国コードの場合は400 invalid_countryを返します。closed_channelsでサポートされていないチャネルまたはプラットフォームを指定すると、400 invalid_settingを返します。 制限付きAPIキーには、applicationsへの書き込みアクセス権が必要です。このスコープを持たないキーは403を受け取ります。

承認

x-api-key
string
header
必須

Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is wrong, revoked or expired; 403 means no key was sent, the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.

ヘッダー

Idempotency-Key
string

Optional retry-safety key you choose for one operation, up to 255 characters (a UUID works). A request repeated with the same key, endpoint, query and body is answered with the first response, same status and same body, and runs and bills nothing a second time. The same key with another endpoint, query or body returns 409 idempotency_key_reused, and while the first request is still running, 409 idempotency_key_in_progress with Retry-After. A failed request (any 4xx or 5xx) is not stored, so you can send it again with the same key. Keys belong to your application, whether you call with an API key or an access token. See Retries and idempotency.

Required string length: 1 - 255

ボディ

application/json

Countries and routes to switch in bulk.

countries
object[]
必須

The countries to change.

Minimum array length: 1

レスポンス

The country settings were saved. updated counts the country entries in the request.

How many country entries the request carried.

updated
integer
必須

How many country entries the request carried, whether or not an entry changed a saved value.

例:

1

最終更新日 2026年11月24日