Guild for Developers

API for automating token gated access in any applications.

Check out our SDK here: https://www.npmjs.com/package/@guildxyz/sdkarrow-up-right

Guilds

Create Guild

POST https://api.guild.xyz/v1/guild

Request Body

Name
Type
Description

payload*

Object

validation*

Object

{
   "id":2244,
   "name":"api-test",
   "urlName":"api-test",
   "description":"",
   "imageUrl":"/guildLogos/145.svg",
   "createdAt":"2022-03-09T17:28:52.153Z",
   "showMembers":true
}

Guild is an atomic unit of every communities

Get All Guilds

GET https://api.guild.xyz/v1/guild

Check User Access to a Guild

GET https://api.guild.xyz/v1/guild/access/:id/:address

The response is separated by role identifiers.

Path Parameters

Name
Type
Description

id*

number

id of the guild

address*

string

address of the user

Get User

GET https://api.guild.xyz/v1/guild/member/:id/:address

Path Parameters

Name
Type
Description

id*

number

id of the guild

address*

string

address of the user

Get Guilds Joined by a User

GET https://api.guild.xyz/v1/user/membership/:address

Path Parameters

Name
Type
Description

address*

string

address of the user

Join a Guild

POST https://api.guild.xyz/v1/user/join

Request Body

Name
Type
Description

payload*

Object

validation*

Object

Get a Guild by ID

GET https://api.guild.xyz/v1/guild/:id

Path Parameters

Name
Type
Description

id*

string

id/urlName of the guild

Guild ID could be a number or an urlName of a guild.

Update Guild

PATCH https://api.guild.xyz/v1/guild/:id

Request Body

Name
Type
Description

payload*

Object

validation*

Object

Automate new role creation, manage hundreds of roles and update them on the fly.

A few examples where this could be useful:

  1. Extend an allow list automatically.

  2. Users can invite others by adding their address to an allow list.

Delete Guild

DELETE https://api.guild.xyz/v1/guild/:id

Path Parameters

Name
Type
Description

*

number

Request Body

Name
Type
Description

payload*

Object

validation*

Object

Roles

Get Role

GET https://api.guild.xyz/v1/role/:id

Path Parameters

Name
Type
Description

*

number

Roles are the building-blocks of all guilds. You can create as many as you want to distinguish users by certain conditions.

Each role can represent a membership type, grant temporary or permanent access to content in your application.

Common use-cases include:

  1. Membership tiers

  2. Clubs

  3. Permission management for work collaboration.

  4. Access to articles.

  5. Ticket to a virtual event or IRL.

  6. Special privileges in a social application.

Create Role

POST https://api.guild.xyz/v1/role

Request Body

Name
Type
Description

payload*

Object

validation*

Object

To create a new role, you need to define its requirements and the logic type of stacking these requirements.

Update Role

PATCH https://api.guild.xyz/v1/role/:id

Path Parameters

Name
Type
Description

*

number

Request Body

Name
Type
Description

payload*

Object

validation*

Object

You can update roles anytime, but be aware that existing members might loose access to their guild if the requirements change.

Updating roles programatically is a powerful way to manage communities with dynamic membership requirements or keep requirements up-to-date automatically.

Delete Role

DELETE https://api.guild.xyz/v1/role/:id

Path Parameters

Name
Type
Description

*

number

Request Body

Name
Type
Description

payload*

Object

validation*

Object

Requirements

Guild enables requirement creation based on standard contract types and integrated protocols.

COIN

Native fungible tokens of supported blockchains.

ERC-20

Commonly referred to as tokens.

ERC-721 or ERC-1155

Commonly referred to as NFTs.

NFTs issued by the Proof of Attendance Protocol (POAP) represent special shared memories.

NFTs minted on Mirror.xyz, the web3-native publishing platform.

Membership NFTs issued by the Unlock Protocol.

Snapshot strategies are JavaScript functions that return a score for a set of addresses. They are being used on Guild to enable any custom condition check.

Currently available strategies: https://github.com/snapshot-labs/snapshot-strategies/tree/master/src/strategiesarrow-up-right

Learn how to create a new strategy: https://docs.snapshot.org/strategies/createarrow-up-right

Tokens created with Juicebox protocol, so communities can utilize their tokens while they are still staked.

ALLOWLIST

Allow lists, commonly referred to as "whitelists" enable curation based on a list of wallet addresses collected from an external source.

FREE

Guest pass for guild members without any requirements.

Last updated

Was this helpful?