REST APILinkLink Permissions

POST

Attest whether the user is a citizen or resident of their current IP-derived jurisdiction.

Header Params

  • user-id string required
    User id of the user making the request.

    at least 1 characters

Body Params

object

Attestation request body. Records the user's Restricted Individual answer and claimed jurisdiction, which must match the request's IP-derived location.
  • country string required
    ISO 3166-1 alpha-3 code of the jurisdiction the user is attesting for. Must match the request's IP-derived country.
  • subdivision string
    Bare ISO 3166-2 subdivision code (e.g. NY) of the jurisdiction the user is attesting for. Must match the request's IP-derived subdivision; omit only for country-level jurisdictions.

    at least 1 characters

  • isRestrictedIndividual boolean required
    The user's answer to the "Restricted Individual" question for the jurisdiction.

Responses

200
OK

Response Body

object

codec for the POST /api/link/v1/attestations response
  • geoAttestation object required

    The user's resolved geo-attestation for the jurisdiction derived from their request IP. country is the ISO 3166-1 alpha-3 code resolved from the request's geolocation and is always present; subdivision is the bare ISO 3166-2 subdivision code (e.g. NY) and is omitted for country-level jurisdictions.

    not_attested covers both a user who has never attested for the jurisdiction and one whose latest attestation has expired — in both cases attestedAt and expiresAt are omitted, since no attestation is currently in force.

    geoAttestation object
    • country string required
      ISO 3166-1 alpha-3 code of the request's IP-derived jurisdiction.

      at least 1 characters

    • subdivision string
      Bare ISO 3166-2 subdivision code (e.g. NY); omitted for country-level jurisdictions.
    • attestationStatus string enum required
      The resolved attestation state for the jurisdiction.
      not_attestedattested_unrestrictedattested_restricted
    • attestedAt string date-time
      When the winning attestation was recorded; omitted while not_attested.
    • expiresAt string date-time
      When the winning attestation stops being valid; omitted while not_attested.
400
Bad Request
No response body
401
Unauthorized

Response Body

object

Standard structured error response payload for Link API v1 error responses. Contains an error name and human-readable error message.
  • errorName string required
  • error string required
403
Forbidden

Response Body

object

Standard structured error response payload for Link API v1 error responses. Contains an error name and human-readable error message.
  • errorName string required
  • error string required
409
Conflict

Response Body

object

Codec for the 409 response returned when the attested jurisdiction does not match the request's IP-derived one. Carries the current resolved geo-attestation so the UI can re-prompt the user for the jurisdiction they are actually in.
  • errorName string required
  • error string required
  • geoAttestation object required

    The user's resolved geo-attestation for the jurisdiction derived from their request IP. country is the ISO 3166-1 alpha-3 code resolved from the request's geolocation and is always present; subdivision is the bare ISO 3166-2 subdivision code (e.g. NY) and is omitted for country-level jurisdictions.

    not_attested covers both a user who has never attested for the jurisdiction and one whose latest attestation has expired — in both cases attestedAt and expiresAt are omitted, since no attestation is currently in force.

    geoAttestation object
    • country string required
      ISO 3166-1 alpha-3 code of the request's IP-derived jurisdiction.

      at least 1 characters

    • subdivision string
      Bare ISO 3166-2 subdivision code (e.g. NY); omitted for country-level jurisdictions.
    • attestationStatus string enum required
      The resolved attestation state for the jurisdiction.
      not_attestedattested_unrestrictedattested_restricted
    • attestedAt string date-time
      When the winning attestation was recorded; omitted while not_attested.
    • expiresAt string date-time
      When the winning attestation stops being valid; omitted while not_attested.
422
Unprocessable Entity

Response Body

object

Standard structured error response payload for Link API v1 error responses. Contains an error name and human-readable error message.
  • errorName string required
  • error string required
500
Internal Server Error

Response Body

object

Standard structured error response payload for Link API v1 error responses. Contains an error name and human-readable error message.
  • errorName string required
  • error string required