Global.Church Developer Portal
Global.Church API

Profile

Endpoint:https://api.global.church

Create user profile

POST
https://api.global.church
/v0/profile

Creates the signed-in person's profile, or updates it when one exists. Fields the body omits are left as they are. Send the signed-in person's Home sign-in token in the x-home-id-token header; the gateway verifies it and refuses the request with 401 without a valid one. The acting person is the token's subject: userId is set from it and any userId sent in the body is ignored.

Create user profile › 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.

Create user profile › Request Body

  • firstNamestring · required
  • lastNamestring · required
  • emailstring · email

    Optional contact email on the profile. It is not verified.

  • authProviderstring

    Identity provider that authenticated the person (for example faithnet).

  • authIssuerstring · uri

    OIDC issuer URL the person's id was issued by.

Create user profile › Responses

The profile as stored

  • profileobject · required

CORS preflight for profile

OPTIONS
https://api.global.church
/v0/profile

CORS preflight for profile › Responses

No content

No data returned

Update user profile

PATCH
https://api.global.church
/v0/profile

Updates first_name and last_name on the profiles table. Send the signed-in person's Home sign-in token in the x-home-id-token header; the gateway verifies it and refuses the request with 401 without a valid one. The acting person is the token's subject: userId is set from it and any userId sent in the body is ignored.

Update user profile › 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.

Update user profile › Request Body

  • firstNamestring · required
  • lastNamestring · required
  • emailstring · email

    Optional contact email on the profile.

Update user profile › Responses

Profile updated

  • okboolean