OpenAPI Specification
openapi: 3.0.1
info:
title: Marketo Engage Rest Approve Tokens API
description: Marketo exposes a REST API which allows for remote execution of many of the systems capabilities. From creating programs to bulk lead import, there are many options which allow fine-grained control of a Marketo instance.
termsOfService: https://www.adobe.com/legal.html
contact:
name: Adobe Developer Relations
url: https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/home
email: developerfeedback@marketo.com
license:
name: API License Agreement
url: https://experienceleague.adobe.com/en/docs/marketo-developer/marketo/api-license
version: '1.0'
servers:
- url: https://localhost:8080/
tags:
- name: Tokens
description: Token Controller
paths:
/rest/asset/v1/folder/{id}/tokens.json:
get:
tags:
- Tokens
summary: Marketo Get Tokens by Folder Id
description: 'Retrieves the list of available My Tokens in the target folder. Required Permissions: Read-Only Assets, Read-Write Assets'
operationId: getTokensByFolderIdUsingGET
parameters:
- name: id
in: path
description: id
required: true
schema:
type: integer
format: int32
- name: folderType
in: query
description: Type of folder. 'Folder' or 'Program'
schema:
type: string
default: Folder
enum:
- Folder
- Program
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseOfTokenResponse'
post:
tags:
- Tokens
summary: Marketo Create Token
description: 'Create or update a token in the parent folder. Required Permissions: Read-Write Assets'
operationId: addTokenTOFolderUsingPOST
parameters:
- name: id
in: path
description: Id of the folder to which the token will be associated with
required: true
schema:
type: integer
format: int32
requestBody:
description: createTokenRequest
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CreateTokenRequest'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseOfTokenResponse'
x-codegen-request-body-name: createTokenRequest
/rest/asset/v1/folder/{id}/tokens/delete.json:
post:
tags:
- Tokens
summary: Marketo Delete Token by Name
description: 'Deletes a token with the given name from the parent folder. Required Permissions: Read-Write Assets'
operationId: deleteTokenByNameUsingPOST
parameters:
- name: id
in: path
description: id
required: true
schema:
type: integer
format: int32
requestBody:
description: deleteTokenRequest
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/DeleteTokenRequest'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ResponseOfIdResponse'
x-codegen-request-body-name: deleteTokenRequest
components:
schemas:
TokenResponse:
required:
- folder
type: object
properties:
folder:
type: string
description: JSON representation of parent folder, with members 'id', and 'type' which may be 'Folder' or 'Program'
example: '{"id":1001,"type":"Program"}'
tokens:
type: array
description: List of tokens in the folder
items:
$ref: '#/components/schemas/TokenDTO'
TokenDTO:
type: object
properties:
computedUrl:
type: string
name:
type: string
type:
type: string
value:
type: string
ResponseOfIdResponse:
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
requestId:
type: string
result:
type: array
items:
$ref: '#/components/schemas/IdResponse'
success:
type: boolean
warnings:
type: array
items:
type: string
CreateTokenRequest:
required:
- folderType
- name
- type
- value
type: object
properties:
folderType:
type: string
description: Type of folder. 'Folder' or 'Program'
enum:
- Program
- Folder
name:
type: string
description: Name of the token. Max length is 50 characters)
type:
type: string
description: Type of the token
enum:
- date
- number
- rich text
- score
- sfdc campaign
- text
value:
type: string
description: Value of the token
IdResponse:
required:
- id
type: object
properties:
id:
type: integer
description: Id of the asset
format: int32
ResponseOfTokenResponse:
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
requestId:
type: string
result:
type: array
items:
$ref: '#/components/schemas/TokenResponse'
success:
type: boolean
warnings:
type: array
items:
type: string
Error:
required:
- code
- message
type: object
properties:
code:
type: string
description: Error code of the error. See full list of error codes <a href="https://developers.marketo.com/rest-api/error-codes/">here</a>
message:
type: string
description: Message describing the cause of the error
DeleteTokenRequest:
type: object
properties:
folderType:
type: string
enum:
- Program
- Folder
name:
type: string
type:
type: string
x-original-swagger-version: '2.0'