CreateSponsorshipInput isRecurring flag in GraphQL API #67767
Replies: 2 comments 1 reply
-
To create a custom monthly recurring sponsorship using the GitHub GraphQL API, you need to set the tierId to null or omit it and also set the isRecurring flag to true. Additionally, you'll need to specify the sponsorEntity and sponsorableLogin. Here's an example GraphQL query for creating a custom monthly recurring sponsorship: mutation CreateSponsorship { Here's a breakdown of the fields you need to specify: sponsorableId: Replace "SPONSORABLE_ID" with the ID of the entity you want to sponsor. This can be the ID of a repository, user, organization, etc. sponsorableLogin: Replace "SPONSORABLE_LOGIN" with the login of the entity you want to sponsor. This corresponds to the username of a user or the name of a repository or organization. tierId: Set this to null or omit it to create a custom sponsorship. isRecurring: Set this to true to indicate that the sponsorship is monthly recurring. amount: Specify the sponsorship amount in cents. For example, if you want to sponsor with $1.00 per month, set it to 100. privacyLevel: Set the privacy level to PRIVATE or PUBLIC based on your preference. Please replace the placeholder values (SPONSORABLE_ID and SPONSORABLE_LOGIN) with the actual values corresponding to the entity you want to sponsor. Once you have constructed your GraphQL query, you can send it to the GitHub GraphQL API endpoint to create the custom monthly recurring sponsorship. Make sure you have the necessary authentication and permissions to perform this action using the GitHub API. |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Hi,
Does anyone know how to create a custom monthly recurring sponsorship using the GraphQL API? Reading the docs gives the impression the
tierId
should be omitted andisRecurring
flag should be set but how do I specifymonthly
?Thanks in advance!
Ali,
Beta Was this translation helpful? Give feedback.
All reactions