Create a registration submission
/v1/compliance/submissionsconst submission = await bird.complianceSubmissions.create({
subject_kind: "number",
subject_id: "nda_01krdgeqcxet5s7t44vh8rt9mg",
program: "local",
country_code: "US",
answers: [
{ key: "legal_entity_name", value: "Goldcrest Communications Inc" },
{ key: "business_registration_number", value: "90012768" },
],
});
// There is no draft: the answers are filed for review as of this call.
console.log(submission.id, submission.satisfied);submission = client.compliance_submissions.create(
subject_kind="number",
subject_id="nda_01krdgeqcxet5s7t44vh8rt9mg",
program="local",
country_code="US",
answers=[
{"key": "legal_entity_name", "value": "Goldcrest Communications Inc"},
{"key": "business_registration_number", "value": "90012768"},
],
)
# There is no draft: the answers are filed for review as of this call.
print(submission.id, submission.satisfied)submission, err := client.ComplianceSubmissions.Create(context.Background(), bird.ComplianceSubmissionsCreateParams{
SubjectKind: "number",
SubjectID: "nda_01krdgeqcxet5s7t44vh8rt9mg",
Program: bird.ComplianceProgramLocal,
CountryCode: "US",
Answers: []bird.ComplianceAnswer{
{Key: "legal_entity_name", Value: bird.Ptr("Goldcrest Communications Inc")},
{Key: "business_registration_number", Value: bird.Ptr("90012768")},
},
})
if err != nil {
log.Fatal(err)
}
// There is no draft: the answers are filed for review as of this call.
fmt.Println(*submission.Id, *submission.Satisfied)$submission = $bird->complianceSubmissions->create(
(new ComplianceSubmissionCreate())
->setSubjectKind('number')
->setSubjectId('nda_01krdgeqcxet5s7t44vh8rt9mg')
->setProgram('local')
->setCountryCode('US')
->setAnswers([
(new ComplianceAnswer())->setKey('legal_entity_name')->setValue('Goldcrest Communications Inc'),
(new ComplianceAnswer())->setKey('business_registration_number')->setValue('90012768'),
]),
);
// There is no draft: the answers are filed for review as of this call.
echo $submission->getId(), "\n";bird compliance submissions create --body-file - <<'JSON'
{
"subject_kind": "sms_sender",
"subject_id": "scr_01krdgeqcxet5s7t44vh8rt9mg",
"program": "alpha",
"country_code": "US",
"identity_id": "cid_01krdgeqcxet5s7t44vh8rt9mg",
"identity": {
"name": "Goldcrest Communications SAS"
},
"answers": [
{
"key": "business_registration_number",
"value": "90012768"
}
]
}
JSONcurl -X POST "https://us1.platform.bird.com/v1/compliance/submissions" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"subject_kind": "sms_sender",
"subject_id": "scr_01krdgeqcxet5s7t44vh8rt9mg",
"program": "alpha",
"country_code": "US",
"identity_id": "cid_01krdgeqcxet5s7t44vh8rt9mg",
"identity": {
"name": "Goldcrest Communications SAS"
},
"answers": [
{
"key": "business_registration_number",
"value": "90012768"
}
]
}'{
"next": [
{
"kind": "operation"
}
],
"id": "csb_01krdgeqcxet5s7t44vh8rt9mg",
"subject_kind": "sms_sender",
"subject_id": "scr_01krdgeqcxet5s7t44vh8rt9mg",
"program": "alpha",
"country_code": "US",
"identity_id": "cid_01krdgeqcxet5s7t44vh8rt9mg",
"items": [
{
"id": "cit_01krdgeqcxet5s7t44vh8rt9mg",
"state": "not_supplied",
"attachment_id": "tca_01krdgeqcxet5s7t44vh8rt9mg",
"attachment_ids": [
"tca_01krdgeqcxet5s7t44vh8rt9mg"
]
}
]
}
Submits every answer at once. Because submissions have no multi-call draft, send a complete set; anything missing or malformed comes back named field by field.
Each answer is then reviewed on its own. Submitting again for a registration that already has
one returns a 409. Use POST /v1/compliance/submissions/{submission_id}/resupply to replace
rejected, expired, or missing answers, and read the submission ID from the requirements for
that registration. Accepted answers normally cannot be changed. During an open verifier
correction and before its deadline, you can replace selected accepted answers. Unchanged entries are ignored; at least
one answer must change. Other answers remain unchanged. A closed number or SMS sender submission must be
reopened by Bird before you can submit an updated form.
An identity submission registers your business itself. Its subject is the party: send the
cid_ id of a party your workspace holds as subject_id, with program business and
country_code ZZ, the international coordinate: your business registers once, not per
country. When subject_kind is identity, send neither identity_id nor identity,
because the subject already names the party.
The answers are a legal representation under the name of the business they describe. Accepted
dossiers can be registered with the carrier or regulator after compliance review.
For SMS sender registrations with an unpaid setup fee, your wallet must cover
setup and the first recurring charge. This submission charges the setup fee;
insufficient funds return 402.
Payload Permintaan
subject_kindWhat is being registered.
sms_sender: a sender registered to send to one country.number: a phone number you hold that needs ownership paperwork before it can carry traffic.identity: a business you operate as, registered once and reused by later registrations that name it.
Possible values: sms_sender, number, identity
subject_idWhat is being registered. For sms_sender this is the scr_ id returned when you register a sender for a country. For number it is the nda_ id of a dedicated number you hold, as returned by GET /v1/numbers. A shared short code (nal_) is not accepted: it is shared, so its ownership paperwork is not yours to file. For identity it is the cid_ id of the party being registered, picked from the parties your workspace holds, as returned by GET /v1/compliance/identities.
programThe registration program a country runs. Available programs depend on the registered resource. An SMS sender registers under an authority regime (alpha or numeric). A phone number proves ownership under its number type (mobile, local, national, short_code, short_code_fteu, or toll_free), matching the values of NumberType. An identity registers your business itself under business, internationally: its coordinate's country is always ZZ. A value is therefore only meaningful alongside the subject it describes. More are added as coverage grows, so treat this as an open set rather than a fixed list.
Possible values (may grow over time): alpha, numeric, mobile, local, national, short_code, short_code_fteu, toll_free, business
country_codeISO 3166-1 alpha-2 country code.
identity_idAn existing party this registration is for. It fills in the business details you left out from what that party already holds, and each single-value answer you file about the party is written back onto it for next time, whatever the verdict. Documents and multi-value answers are asked fresh each time. Send this or identity, never both. An id belonging to another organization is rejected; nothing is created here. When subject_kind is identity, send neither: subject_id already names the party.
identityRegisters this on behalf of a party you have not stored yet, creating it as part
of the submission so you do not need a separate call. Exclusive with
identity_id.
Each time you send this you get a new party. Single-value identity answers filed for one
are reused by registrations naming the same party. Documents and lists are
supplied separately for each registration. Send this once and use the
identity_id from the response for the countries that follow.
answersEvery answer at once. Because submissions have no multi-call draft, send a complete set. Anything missing or malformed comes back named. A requirement the named party already answers may be left out; one you send anyway wins over what the party holds.
Payload Respons
nextWhat to do next about this submission, given the state it is in. Each entry names one action and says why it is worth taking, so you can act on this response without working out the order yourself. Present on reads that compute it: an empty list means there is nothing to do, and the field is absent entirely on responses that do not report next actions.
A submission reports the answers you filed; whether the country's requirements are met is reported by the requirements read. So this points there rather than repeating a verdict it does not own.
Tampilkan atribut turunan
next.kindWhat you do about this step.
operation: call the operation named inoperation, then read again.external: act somewhere this API does not reach, then read again.wait: nothing is asked of you, so read again later.terminal: nothing you do resolves this, so stop retrying.
Tolerate a value you do not recognize: show the description and
offer no action.
Possible values (may grow over time): operation, external, wait, terminal
next.descriptionA short, human-readable label for the step, suitable for display.
next.operationThe operationId to call. Present only when kind is operation. The operation's own schema says how to call it; this says only which one, and what to address it with.
next.paramsThe parameters that address the operation, by name: {"sender_id": "…"} for an operation on /v1/sms/senders/{sender_id}/requirements. A parameter the operation takes in its query string is given the same way, so an operation addressed as ?subject_id= carries {"subject_id": "…"}. Every parameter the call needs is here, whether its value came from the thing you were acting on or is fixed for this step, so you can make the call from this object alone. Present only when kind is operation and the operation names a subject. A request body, when the operation takes one, is described by the operation's own schema and never appears here.
next.urlA URL to open. Present only when kind is external, and only when the step has one. An external step whose description says to go and do something with no URL to open is normal.
idsubject_kindsubject_idprogramcountry_codeidentity_idThe party this registration was filed for, or null if none was named.
satisfiedWhether this country's requirements are met. true once the submission is approved and every required requirement is approved or marked not applicable. This can remain true when an external verifier requests a correction. Once you submit that correction, it must pass review before this becomes true again, including any optional answers you change.
itemsEvery answer and where it stands. Each is decided on its own.
created_atWhen this was submitted.
updated_atWhen it last changed.
closed_atWhen this submission was closed. Null while it remains open.
closure_reasonThe decline reason for a closed submission, or null while open.
Sumber daya terkait
Lanjutkan dengan dokumentasi, panduan, dan contoh untuk topik ini.