Can I invite project members via API
wangxuedong
PROOP

9 months ago

I want to invite project members via Railway API. Is there has a way to sort it out?

Solved$20 Bounty

Pinned Solution

9 months ago

Not officially. But that doesn't mean you can't do it!

https://backboard.railway.com/graphql/internal?q=projectInvitationCreate is the URL you're going to want to hit. This is the JSON data that you can send. In my example, I am inviting the email loudbooked@gmail.com to a project with the ID of 322ea2ee-d764-421d-9d11-77dde0980f62.

{
    "query": "mutation projectInvitationCreate($id: String!, $input: ProjectInvitee!) {\n  projectInvitationCreate(id: $id, input: $input) {\n    id\n    project {\n      id\n    }\n  }\n}",
    "variables": {
        "id": "322ea2ee-d764-421d-9d11-77dde0980f62",
        "input": {
            "email": "loudbooked@gmail.com",
            "role": "MEMBER"
        }
    },
    "operationName": "projectInvitationCreate"
} 

Make sure to include your authorization token like any other public API request.

6 Replies

9 months ago

Not officially. But that doesn't mean you can't do it!

https://backboard.railway.com/graphql/internal?q=projectInvitationCreate is the URL you're going to want to hit. This is the JSON data that you can send. In my example, I am inviting the email loudbooked@gmail.com to a project with the ID of 322ea2ee-d764-421d-9d11-77dde0980f62.

{
    "query": "mutation projectInvitationCreate($id: String!, $input: ProjectInvitee!) {\n  projectInvitationCreate(id: $id, input: $input) {\n    id\n    project {\n      id\n    }\n  }\n}",
    "variables": {
        "id": "322ea2ee-d764-421d-9d11-77dde0980f62",
        "input": {
            "email": "loudbooked@gmail.com",
            "role": "MEMBER"
        }
    },
    "operationName": "projectInvitationCreate"
} 

Make sure to include your authorization token like any other public API request.


wangxuedong
PROOP

9 months ago

I'll have a try, many thanks to you.


wangxuedong

I'll have a try, many thanks to you.

9 months ago

Let me know if it works!


wangxuedong
PROOP

9 months ago

Great job - it works fine


wangxuedong
PROOP

9 months ago

Hello railway supporter, why this issue has $20 bounty? In my memory, I didn't increase this bounty. Could you explain what's going on?


wangxuedong

Hello railway supporter, why this issue has $20 bounty? In my memory, I didn't increase this bounty. Could you explain what's going on?

9 months ago

Bounty amounts are determined by admins, and bounties are paid out by Railway, not the user.


Status changed to Awaiting User Response Railway 9 months ago


Status changed to Solved brody 9 months ago


Loading...