nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Gateways

Accept the gateway terms of use

posthttps://api.nsin.ir/domains/{domain}/gateways/terms/accept

Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.

Records acceptance for this domain. Idempotent — re-accepting keeps the original timestamp and accepter. Requires the same permission as enabling a gateway.

Path parameters

  • domainstringrequiredpath

    The domain name (for example example.com) — not a numeric id.

Responses

200Terms status after acceptance

Content type: application/json

  • acceptedboolean

    Whether this domain has accepted the gateway terms of use.

  • accepted_atstring (date-time)

    When they were accepted.

  • accepted_by_idinteger

    User id of whoever accepted them.

  • accepted_by_namestring

    Their name, when known.

  • accepted_by_emailstring

    Their email, when known.

  • versioninteger

    Revision of the terms that was accepted.

json
{
  "accepted": true,
  "accepted_at": "2026-01-01T00:00:00Z",
  "accepted_by_id": 0,
  "accepted_by_name": "string",
  "accepted_by_email": "string",
  "version": 0
}
401Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "invalid API key"
}
403The key is read-only, your role on the domain lacks the required permission, or the domain's plan does not include the feature.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}

Example request

bash
curl -X POST "https://api.nsin.ir/domains/example.com/gateways/terms/accept" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc