Skip to content

Instantly share code, notes, and snippets.

@cedrickchee
Forked from danielgross/ai-plugin.json
Created March 25, 2023 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cedrickchee/62e6c945abf22d9662741960d0b90415 to your computer and use it in GitHub Desktop.
Save cedrickchee/62e6c945abf22d9662741960d0b90415 to your computer and use it in GitHub Desktop.
ChatGPT Plugin for Twilio
{
"schema_version": "v1",
"name_for_model": "twilio",
"name_for_human": "Twilio Plugin",
"description_for_model": "Plugin for integrating the Twilio API to send SMS messages and make phone calls. Use it whenever a user wants to send a text message or make a call using their Twilio account.",
"description_for_human": "Send text messages and make phone calls with Twilio.",
"auth": {
"type": "user_http",
"authorization_type": "basic"
},
"api": {
"type": "openapi",
"url": "https://your-app-url.com/.well-known/twilio.yaml",
"has_user_authentication": true
},
"logo_url": "https://your-app-url.com/.well-known/logo.png",
"contact_email": "hello@contact.com",
"legal_info_url": "hello@legal.com"
}
openapi: 3.0.2
info:
title: Twilio API
description: A Twilio API for sending SMS and making calls.
version: 1.0.0
servers:
- url: https://api.twilio.com/2010-04-01
paths:
/Accounts/{accountSid}/Messages:
post:
summary: Send SMS
description: Send an SMS message to a specified phone number.
operationId: send_sms
parameters:
- in: path
name: accountSid
schema:
type: string
required: true
description: The account SID to send the message from.
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: "#/components/schemas/SendSMSRequest"
required: true
responses:
"201":
description: Successful Response
content:
application/json:
schema:
$ref: "#/components/schemas/SendSMSResponse"
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
security:
- HTTPBasic: []
/Accounts/{accountSid}/Calls:
post:
summary: Make call
description: Make a call to a specified phone number.
operationId: make_call
parameters:
- in: path
name: accountSid
schema:
type: string
required: true
description: The account SID to make the call from.
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: "#/components/schemas/MakeCallRequest"
required: true
responses:
"201":
description: Successful Response
content:
application/json:
schema:
$ref: "#/components/schemas/MakeCallResponse"
"422":
description: Validation Error
content:
application/json:
schema:
$ref: "#/components/schemas/HTTPValidationError"
security:
- HTTPBasic: []
components:
schemas:
SendSMSRequest:
title: SendSMSRequest
type: object
properties:
To:
title: To
type: string
description: The phone number to send the SMS to.
From:
title: From
type: string
description: The phone number to send the SMS from.
Body:
title: Body
type: string
description: The body of the SMS message.
SendSMSResponse:
title: SendSMSResponse
type: object
properties:
sid:
title: Sid
type: string
description: The SID of the sent SMS message.
MakeCallRequest:
title: MakeCallRequest
type: object
properties:
To:
title: To
type: string
description: The phone number to call.
From:
title: From
type: string
description: The phone number to make the call from.
Url:
title: Url
type: string
description: The URL to fetch TwiML instructions from when the call connects.
MakeCallResponse:
title: MakeCallResponse
type: object
properties:
sid:
title: Sid
type: string
description: The SID of the created call.
HTTPValidationError:
title: HTTPValidationError
type: object
properties:
detail:
title: Detail
type: array
items:
$ref: "#/components/schemas/ValidationError"
ValidationError:
title: ValidationError
required:
- loc
- msg
- type
type: object
properties:
loc:
title: Location
type: array
items:
anyOf:
- type: string
- type: integer
msg:
title: Message
type: string
type:
title: Error Type
type: string
securitySchemes:
HTTPBasic:
type: http
scheme: basic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment