Global.Church Developer Portal
Global.Church API

Organization Links

Endpoint:https://api.global.church

List my organizations

POST
https://api.global.church
/v0/org-links/mine

Returns the organizations the signed-in person belongs to. Membership is read from the Home at request time and kept only for organizations whose directory record has a confirmed link; a steward of the organization is returned as org_admin, a member as org_member. Send the signed-in person's Home sign-in token in the x-home-id-token header; the gateway verifies it and the acting person is the token's subject.

List my organizations › Headers

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

  • x-home-id-tokenstring · required

    The signed-in person's sign-in token (the ES256 id_token issued by the Home). The gateway verifies its signature, issuer, audience and expiry, and takes the acting person from its subject.

List my organizations › Request Body
optional

List my organizations › Responses

The person's organizations

  • orgsobject[] · required

CORS preflight for my organizations

OPTIONS
https://api.global.church
/v0/org-links/mine

CORS preflight for my organizations › Responses

No content

No data returned

GET
https://api.global.church
/v0/org-links

Returns the link requests the signed-in person has made, in any status, newest first. Send the signed-in person's Home sign-in token in the x-home-id-token header; the gateway verifies it and the acting person is the token's subject.

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

  • x-home-id-tokenstring · required

    The signed-in person's sign-in token (the ES256 id_token issued by the Home). The gateway verifies its signature, issuer, audience and expiry, and takes the acting person from its subject.

The person's link requests

  • linksobject[] · required

POST
https://api.global.church
/v0/org-links

Asks for an organization held in the Home to be linked to its directory record. The person must be a steward of that organization in the Home, which is checked at request time. Name the directory record with orgUri, or describe an organization that is not listed yet with newOrg — exactly one of the two. The request is created as pending and takes effect once a Global.Church reviewer confirms it. Repeating the same request returns the existing pending one. Send the signed-in person's Home sign-in token in the x-home-id-token header; the gateway verifies it and the acting person is the token's subject.

Request an organization link › Headers

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

  • x-home-id-tokenstring · required

    The signed-in person's sign-in token (the ES256 id_token issued by the Home). The gateway verifies its signature, issuer, audience and expiry, and takes the acting person from its subject.

Request an organization link › Request Body

  • homeOrgAddressstring · required

    The organization's account address in the Home (0x…).

  • homeOrgNamestring

    The organization's .org name in the Home, as the app received it from the chooser. The Home's own answer takes precedence.

  • homeDisplayNamestring

    The organization's display name in the Home, as the app received it from the chooser (at most 80 characters). The Home's own answer takes precedence. A label, never evidence.

  • orgUristring

    URI of the directory record this organization is. Omit when sending newOrg.

  • newOrgobject

    Details of an organization that is not in the directory yet. Omit when sending orgUri.

Request an organization link › Responses

Link request created, or the existing pending request

  • linkobject · required

    A link between an organization's directory record and the organization that holds it in the Home. A steward requests the link; a Global.Church reviewer confirms it.


OPTIONS
https://api.global.church
/v0/org-links

CORS preflight for organization links › Responses

No content

No data returned

PATCH
https://api.global.church
/v0/org-links

Sets whether a confirmed link is published. The person must be a steward of the linked organization in the Home, which is checked at request time. Send the signed-in person's Home sign-in token in the x-home-id-token header; the gateway verifies it and the acting person is the token's subject.

Publish or unpublish a link › Headers

  • Authorizationstring · required

    The Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.

  • x-home-id-tokenstring · required

    The signed-in person's sign-in token (the ES256 id_token issued by the Home). The gateway verifies its signature, issuer, audience and expiry, and takes the acting person from its subject.

Publish or unpublish a link › Request Body

  • linkIdstring · uuid · required
  • publishedboolean · required

Publish or unpublish a link › Responses

Link updated

  • linkobject · required

    A link between an organization's directory record and the organization that holds it in the Home. A steward requests the link; a Global.Church reviewer confirms it.