heymegabyte/agent-skills / skills/resend
resend
VerifiedResend API skill — auto-forged from OpenAPI 1.5.0. Resend is the email platform for developers.
client.ts
View on GitHub// Auto-generated by forge-skill-from-openapi
// API: resend
// DO NOT EDIT — re-run forge to regenerate
import type * as T from './types.js';
function appendQuery(url: string, query?: Record<string, string>): string {
if (!query || Object.keys(query).length === 0) return url;
const qs = new URLSearchParams(query).toString();
return url.includes('?') ? `${url}&${qs}` : `${url}?${qs}`;
}
export class ResendClient {
constructor(
private readonly apiToken: string,
private readonly baseUrl: string = 'https://api.resend.com',
) {}
private async request<T>(method: string, url: string, body?: string): Promise<T> {
const res = await fetch(url, {
method,
headers: {
'Authorization': `Bearer ${this.apiToken}`,
'Content-Type': 'application/json',
'Accept': 'application/json',
},
body,
});
if (!res.ok) {
const text = await res.text().catch(() => '');
throw new Error(`${method} ${url} → ${res.status}: ${text}`);
}
if (res.status === 204) return undefined as T;
return res.json() as T;
}
async getemails(): Promise<unknown> {
return this.request('GET', `https://api.resend.com/emails`);
},
async postemails(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/emails`, body ? JSON.stringify(body) : undefined);
},
async getemailsEmailId(email_id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/emails/${email_id}`);
},
async patchemailsEmailId(email_id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('PATCH', `https://api.resend.com/emails/${email_id}`, body ? JSON.stringify(body) : undefined);
},
async postemailsEmailIdCancel(email_id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/emails/${email_id}/cancel`, body ? JSON.stringify(body) : undefined);
},
async postemailsBatch(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/emails/batch`, body ? JSON.stringify(body) : undefined);
},
async getemailsEmailIdAttachments(email_id: string, query?: Record<string, string>): Promise<unknown> {
return this.request('GET', appendQuery(`https://api.resend.com/emails/${email_id}/attachments`, query));
},
async getemailsEmailIdAttachmentsAttachmentId(email_id: string, attachment_id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/emails/${email_id}/attachments/${attachment_id}`);
},
async getemailsReceiving(query?: Record<string, string>): Promise<unknown> {
return this.request('GET', appendQuery(`https://api.resend.com/emails/receiving`, query));
},
async getemailsReceivingEmailId(email_id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/emails/receiving/${email_id}`);
},
async getemailsReceivingEmailIdAttachments(email_id: string, query?: Record<string, string>): Promise<unknown> {
return this.request('GET', appendQuery(`https://api.resend.com/emails/receiving/${email_id}/attachments`, query));
},
async getemailsReceivingEmailIdAttachmentsAttachmentId(email_id: string, attachment_id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/emails/receiving/${email_id}/attachments/${attachment_id}`);
},
async getdomains(): Promise<unknown> {
return this.request('GET', `https://api.resend.com/domains`);
},
async postdomains(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/domains`, body ? JSON.stringify(body) : undefined);
},
async getdomainsDomainId(domain_id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/domains/${domain_id}`);
},
async patchdomainsDomainId(domain_id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('PATCH', `https://api.resend.com/domains/${domain_id}`, body ? JSON.stringify(body) : undefined);
},
async deletedomainsDomainId(domain_id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/domains/${domain_id}`);
},
async postdomainsDomainIdVerify(domain_id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/domains/${domain_id}/verify`, body ? JSON.stringify(body) : undefined);
},
async getapiKeys(): Promise<unknown> {
return this.request('GET', `https://api.resend.com/api-keys`);
},
async postapiKeys(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/api-keys`, body ? JSON.stringify(body) : undefined);
},
async deleteapiKeysApiKeyId(api_key_id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/api-keys/${api_key_id}`);
},
async gettemplates(): Promise<unknown> {
return this.request('GET', `https://api.resend.com/templates`);
},
async posttemplates(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/templates`, body ? JSON.stringify(body) : undefined);
},
async gettemplatesId(id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/templates/${id}`);
},
async patchtemplatesId(id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('PATCH', `https://api.resend.com/templates/${id}`, body ? JSON.stringify(body) : undefined);
},
async deletetemplatesId(id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/templates/${id}`);
},
async posttemplatesIdPublish(id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/templates/${id}/publish`, body ? JSON.stringify(body) : undefined);
},
async posttemplatesIdDuplicate(id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/templates/${id}/duplicate`, body ? JSON.stringify(body) : undefined);
},
async getaudiences(): Promise<unknown> {
return this.request('GET', `https://api.resend.com/audiences`);
},
async postaudiences(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/audiences`, body ? JSON.stringify(body) : undefined);
},
async getaudiencesId(id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/audiences/${id}`);
},
async deleteaudiencesId(id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/audiences/${id}`);
},
async getcontacts(query?: Record<string, string>): Promise<unknown> {
return this.request('GET', appendQuery(`https://api.resend.com/contacts`, query));
},
async postcontacts(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/contacts`, body ? JSON.stringify(body) : undefined);
},
async getcontactsId(id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/contacts/${id}`);
},
async patchcontactsId(id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('PATCH', `https://api.resend.com/contacts/${id}`, body ? JSON.stringify(body) : undefined);
},
async deletecontactsId(id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/contacts/${id}`);
},
async getbroadcasts(): Promise<unknown> {
return this.request('GET', `https://api.resend.com/broadcasts`);
},
async postbroadcasts(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/broadcasts`, body ? JSON.stringify(body) : undefined);
},
async getbroadcastsId(id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/broadcasts/${id}`);
},
async patchbroadcastsId(id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('PATCH', `https://api.resend.com/broadcasts/${id}`, body ? JSON.stringify(body) : undefined);
},
async deletebroadcastsId(id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/broadcasts/${id}`);
},
async postbroadcastsIdSend(id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/broadcasts/${id}/send`, body ? JSON.stringify(body) : undefined);
},
async getwebhooks(query?: Record<string, string>): Promise<unknown> {
return this.request('GET', appendQuery(`https://api.resend.com/webhooks`, query));
},
async postwebhooks(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/webhooks`, body ? JSON.stringify(body) : undefined);
},
async getwebhooksWebhookId(webhook_id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/webhooks/${webhook_id}`);
},
async patchwebhooksWebhookId(webhook_id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('PATCH', `https://api.resend.com/webhooks/${webhook_id}`, body ? JSON.stringify(body) : undefined);
},
async deletewebhooksWebhookId(webhook_id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/webhooks/${webhook_id}`);
},
async getsegments(): Promise<unknown> {
return this.request('GET', `https://api.resend.com/segments`);
},
async postsegments(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/segments`, body ? JSON.stringify(body) : undefined);
},
async getsegmentsId(id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/segments/${id}`);
},
async deletesegmentsId(id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/segments/${id}`);
},
async gettopics(): Promise<unknown> {
return this.request('GET', `https://api.resend.com/topics`);
},
async posttopics(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/topics`, body ? JSON.stringify(body) : undefined);
},
async gettopicsId(id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/topics/${id}`);
},
async patchtopicsId(id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('PATCH', `https://api.resend.com/topics/${id}`, body ? JSON.stringify(body) : undefined);
},
async deletetopicsId(id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/topics/${id}`);
},
async getcontactProperties(): Promise<unknown> {
return this.request('GET', `https://api.resend.com/contact-properties`);
},
async postcontactProperties(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/contact-properties`, body ? JSON.stringify(body) : undefined);
},
async getcontactPropertiesId(id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/contact-properties/${id}`);
},
async patchcontactPropertiesId(id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('PATCH', `https://api.resend.com/contact-properties/${id}`, body ? JSON.stringify(body) : undefined);
},
async deletecontactPropertiesId(id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/contact-properties/${id}`);
},
async getcontactsContactIdSegments(contact_id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/contacts/${contact_id}/segments`);
},
async postcontactsContactIdSegmentsSegmentId(contact_id: string, segment_id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/contacts/${contact_id}/segments/${segment_id}`, body ? JSON.stringify(body) : undefined);
},
async deletecontactsContactIdSegmentsSegmentId(contact_id: string, segment_id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/contacts/${contact_id}/segments/${segment_id}`);
},
async getcontactsContactIdTopics(contact_id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/contacts/${contact_id}/topics`);
},
async patchcontactsContactIdTopics(contact_id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('PATCH', `https://api.resend.com/contacts/${contact_id}/topics`, body ? JSON.stringify(body) : undefined);
},
async getlogs(): Promise<unknown> {
return this.request('GET', `https://api.resend.com/logs`);
},
async getlogsLogId(log_id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/logs/${log_id}`);
},
async getautomations(query?: Record<string, string>): Promise<unknown> {
return this.request('GET', appendQuery(`https://api.resend.com/automations`, query));
},
async postautomations(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/automations`, body ? JSON.stringify(body) : undefined);
},
async getautomationsAutomationId(automation_id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/automations/${automation_id}`);
},
async patchautomationsAutomationId(automation_id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('PATCH', `https://api.resend.com/automations/${automation_id}`, body ? JSON.stringify(body) : undefined);
},
async deleteautomationsAutomationId(automation_id: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/automations/${automation_id}`);
},
async postautomationsAutomationIdStop(automation_id: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/automations/${automation_id}/stop`, body ? JSON.stringify(body) : undefined);
},
async getautomationsAutomationIdRuns(automation_id: string, query?: Record<string, string>): Promise<unknown> {
return this.request('GET', appendQuery(`https://api.resend.com/automations/${automation_id}/runs`, query));
},
async getautomationsAutomationIdRunsRunId(automation_id: string, run_id: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/automations/${automation_id}/runs/${run_id}`);
},
async getevents(): Promise<unknown> {
return this.request('GET', `https://api.resend.com/events`);
},
async postevents(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/events`, body ? JSON.stringify(body) : undefined);
},
async posteventsSend(body?: Record<string, unknown>): Promise<unknown> {
return this.request('POST', `https://api.resend.com/events/send`, body ? JSON.stringify(body) : undefined);
},
async geteventsIdentifier(identifier: string): Promise<unknown> {
return this.request('GET', `https://api.resend.com/events/${identifier}`);
},
async patcheventsIdentifier(identifier: string, body?: Record<string, unknown>): Promise<unknown> {
return this.request('PATCH', `https://api.resend.com/events/${identifier}`, body ? JSON.stringify(body) : undefined);
},
async deleteeventsIdentifier(identifier: string): Promise<unknown> {
return this.request('DELETE', `https://api.resend.com/events/${identifier}`);
},
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |